cgv
cgv::math::rigid_transform< T > Class Template Reference

#include <rigid_transform.h>

Public Types

typedef cgv::math::fvec< T, 3 > vec_type
 type of 3d vector
 
typedef cgv::math::fvec< T, 4 > hvec_type
 type of homogenous vector
 
typedef cgv::math::quaternion< T > quat_type
 type of quaternions
 
typedef cgv::math::fmat< T, 3, 3 > mat_type
 type of 3x3 matrix
 
typedef cgv::math::fmat< T, 4, 4 > hmat_type
 type of 4x4 matrix
 

Public Member Functions

 rigid_transform ()
 construct identity
 
 rigid_transform (const quat_type &_q, const vec_type &_t)
 construct from quaternion and translation vector to the transformation that first rotates and then translates
 
void transform_vector (vec_type &v) const
 apply transformation to vector
 
void transform_point (vec_type &p) const
 apply transformation to point
 
rigid_transform< T > operator* (const rigid_transform< T > &M) const
 concatenate two rigid transformations
 
rigid_transform< T > & operator+= (const rigid_transform< T > &T)
 multiply quaternion and translation with scalar
 
rigid_transform< T > & operator*= (T s)
 multiply quaternion and translation with scalar
 
rigid_transform< T > operator* (T s) const
 multiply quaternion and translation with scalar
 
rigid_transform< T > inverse () const
 return the inverse transformation
 
vec_type get_transformed_vector (const vec_type &v) const
 apply transformation to vector
 
vec_type get_transformed_point (const vec_type &p) const
 apply transformation to point
 
const vec_typeget_translation () const
 return the translational part
 
vec_typeref_translation ()
 return the translational part
 
const quat_typeget_quaternion () const
 return the rotation as quaternion
 
quat_typeref_quaternion ()
 return the rotation as quaternion
 
hmat_type get_hmat () const
 convert transformation to homogeneous transformation
 
hmat_type get_transposed_hmat () const
 convert transformation to transpose of homogeneous transformation
 

Protected Attributes

quat_type q
 store transformation as quaternion
 
vec_type t
 and translation vector
 

Detailed Description

template<typename T>
class cgv::math::rigid_transform< T >

implementation of a rigid body transformation with a quaternion and a translation vector.


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