mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mf::pose Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

mf::pose::pose ( )

Create identity pose.

mf::pose::pose ( const 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.

template<typename Translation , typename Rotation >
mf::pose::pose ( const Translation &  t,
const Rotation &  r 
)
inline

Construct pose with given translation and rotation.

Member Function Documentation

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())
pose mf::pose::from_string ( const std::string &  str)
static
void mf::pose::invert_orientation ( )
void mf::pose::look_at ( const Eigen_vec3 target)
std::string mf::pose::to_string ( ) const
Eigen_vec3 mf::pose::transform_from_world ( const Eigen::Vector3f &  p) const
inline
Eigen_vec3 mf::pose::transform_to_world ( const Eigen::Vector3f &  p) const
inline
Eigen_affine3 mf::pose::transformation_from ( const pose ps) const
inline
Eigen_affine3 mf::pose::transformation_from_world ( ) const

Affine transformation from world space to pose coordinate system.

Eigen_affine3 mf::pose::transformation_to ( const pose ps) const
inline
Eigen_affine3 mf::pose::transformation_to_world ( ) const

Affine transformation from pose coordinate system to world space.

Member Data Documentation

Eigen_quaternion mf::pose::orientation

Orientation quaternion. Must be kept normalized.

Eigen_vec3 mf::pose::position

Position vector.


The documentation for this class was generated from the following files: