mf
Media Framework
|
Position and orientation in space. More...
#include <pose.h>
Public Member Functions | |
pose () | |
Create identity pose. More... | |
pose (const pose &)=default | |
Copy-construct pose. More... | |
pose (const Eigen_affine3 &) | |
Construct pose from affine transformation. More... | |
template<typename Translation , typename Rotation > | |
pose (const Translation &t, const Rotation &r) | |
Construct pose with given translation and rotation. More... | |
Eigen_affine3 | transformation_from_world () const |
Affine transformation from world space to pose coordinate system. More... | |
Eigen_affine3 | transformation_to_world () const |
Affine transformation from pose coordinate system to world space. More... | |
Eigen_affine3 | transformation_from (const pose &ps) const |
Eigen_affine3 | transformation_to (const pose &ps) const |
Eigen_vec3 | euler_angles (std::ptrdiff_t a0=0, std::ptrdiff_t a1=1, std::ptrdiff_t a2=2) const |
std::string | to_string () const |
Eigen_vec3 | transform_from_world (const Eigen::Vector3f &p) const |
Eigen_vec3 | transform_to_world (const Eigen::Vector3f &p) const |
void | look_at (const Eigen_vec3 &) |
void | flip (const Eigen_vec3 &axis=Eigen_vec3::UnitY()) |
void | invert_orientation () |
Static Public Member Functions | |
static pose | from_string (const std::string &) |
Public Attributes | |
Eigen_vec3 | position |
Position vector. More... | |
Eigen_quaternion | orientation |
Orientation quaternion. Must be kept normalized. More... | |
Position and orientation in space.
Represented in terms of a position, and orientation in world space. The orientation is in the translated space, a pose of an object means that the object was first translated to pose.position, then rotated by pose.orientation. A pose also defines an orthonormal coordinate system, aka the world as seen from a camera at that pose.
mf::pose::pose | ( | ) |
Create identity pose.
|
default |
Copy-construct pose.
mf::pose::pose | ( | const Eigen_affine3 & | t | ) |
Construct pose from affine transformation.
Transformation is transformation to world. Assumes that the transformation consists only of translation and rotation.
|
inline |
Construct pose with given translation and rotation.
Eigen_vec3 mf::pose::euler_angles | ( | std::ptrdiff_t | a0 = 0 , |
std::ptrdiff_t | a1 = 1 , |
||
std::ptrdiff_t | a2 = 2 |
||
) | const |
void mf::pose::flip | ( | const Eigen_vec3 & | axis = Eigen_vec3::UnitY() | ) |
|
static |
void mf::pose::invert_orientation | ( | ) |
void mf::pose::look_at | ( | const Eigen_vec3 & | target | ) |
std::string mf::pose::to_string | ( | ) | const |
|
inline |
|
inline |
|
inline |
Eigen_affine3 mf::pose::transformation_from_world | ( | ) | const |
Affine transformation from world space to pose coordinate system.
|
inline |
Eigen_affine3 mf::pose::transformation_to_world | ( | ) | const |
Affine transformation from pose coordinate system to world space.
Eigen_quaternion mf::pose::orientation |
Orientation quaternion. Must be kept normalized.
Eigen_vec3 mf::pose::position |
Position vector.