Pose representation derived from the Rotation class More...
#include <Pose.h>
Public Member Functions | |
void | GetMatrix (CvMat *mat) const |
void | GetMatrixGL (double gl[16], bool mirror=true) |
Get the transformation matrix representation of the Pose using OpenGL's transposed format. Note, that by default this also mirrors both the y- and z-axis (see Camera and Pose for more information) | |
void | GetTranslation (CvMat *tra) const |
void | Invert () |
void | Mirror (bool x, bool y, bool z) |
Pose & | operator= (const Pose &p) |
void | Output () const |
Pose () | |
Pose (CvMat *tra, CvMat *rot, RotationType t) | |
Pose (CvMat *mat) | |
Pose (const Pose &p) | |
void | Reset () |
void | SetMatrix (const CvMat *mat) |
void | SetMatrixGL (double gl[16], bool mirror=true) |
Set the Pose using OpenGL's transposed format. Note, that by default this also mirrors both the y- and z-axis (see Camera and Pose for more information) | |
void | SetTranslation (const CvMat *tra) |
void | SetTranslation (const double *tra) |
void | SetTranslation (const double x, const double y, const double z) |
void | Transpose () |
Public Attributes | |
double | translation [4] |
CvMat | translation_mat |
Pose representation derived from the Rotation class
The rotation part of the transformation is handled by Rotation . The translation part is stored internally using homogeneous 4-vector.
Internally in ALVAR we assume coordinate system where 'x' is right, 'y' is down, and 'z' is forward. However the SetMatrixGL and GetMatrixGL change the pose to support coordinates commonly used in OpenGL: 'x' is right, 'y' is up, and 'z' is backward.
alvar::Pose::Pose | ( | CvMat * | tra, |
CvMat * | rot, | ||
RotationType | t | ||
) |
alvar::Pose::Pose | ( | CvMat * | mat | ) |
alvar::Pose::Pose | ( | const Pose & | p | ) |
void alvar::Pose::GetMatrix | ( | CvMat * | mat | ) | const |
Get the transformation into the given matrix mat
mat | A 3x3 rotation matrix or 3x4 / 4x4 transformation matrix |
Reimplemented from alvar::Rotation.
void alvar::Pose::GetMatrixGL | ( | double | gl[16], |
bool | mirror = true |
||
) |
Get the transformation matrix representation of the Pose using OpenGL's transposed format. Note, that by default this also mirrors both the y- and z-axis (see Camera and Pose for more information)
gl | OpenGL 4x4 transformation matrix elements in column-order |
void alvar::Pose::GetTranslation | ( | CvMat * | tra | ) | const |
void alvar::Pose::Invert | ( | ) |
void alvar::Pose::Mirror | ( | bool | x, |
bool | y, | ||
bool | z | ||
) |
Mirror the Pose
x | If true mirror the x-coordinates |
y | If true mirror the y-coordinates |
z | If true mirror the z-coordinates |
Reimplemented from alvar::Rotation.
void alvar::Pose::Output | ( | ) | const |
void alvar::Pose::Reset | ( | ) |
Reset the pose
Reimplemented from alvar::Rotation.
void alvar::Pose::SetMatrix | ( | const CvMat * | mat | ) |
Set the transformation from the given matrix mat
mat | A 3x3 rotation matrix or 3x4 / 4x4 transformation matrix |
Reimplemented from alvar::Rotation.
void alvar::Pose::SetMatrixGL | ( | double | gl[16], |
bool | mirror = true |
||
) |
void alvar::Pose::SetTranslation | ( | const CvMat * | tra | ) |
Set the translation part for the Pose
tra | Column vector containing three translation elements |
void alvar::Pose::SetTranslation | ( | const double * | tra | ) |
void alvar::Pose::SetTranslation | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
void alvar::Pose::Transpose | ( | ) |
Transpose the transformation
Reimplemented from alvar::Rotation.
double alvar::Pose::translation[4] |