Ravelin
|
A transformation between two rigid body poses. More...
#include <Transform3.h>
Public Member Functions | |
TRANSFORM3 () | |
Default constructor. More... | |
TRANSFORM3 (const TRANSFORM3 &source) | |
TRANSFORM3 (const AANGLE &a) | |
Constructs a transformation from a axis-angle representation (for rotation) and zero translation. | |
TRANSFORM3 (const MATRIX3 &m) | |
Constructs a transformation from a rotation matrix and zero translation. | |
TRANSFORM3 (const QUAT &q) | |
Constructs a transformation from a unit quaternion (for rotation) and zero translation. | |
TRANSFORM3 (const AANGLE &a, const ORIGIN3 &v) | |
Constructs a transformation from a axis-angle representation and a translation vector. | |
TRANSFORM3 (const MATRIX3 &m, const ORIGIN3 &v) | |
Constructs a transformation from a rotation matrix and translation vector. | |
TRANSFORM3 (const QUAT &q, const ORIGIN3 &v) | |
Constructs a transformation from a unit quaternion and translation vector. | |
TRANSFORM3 (const ORIGIN3 &v) | |
Constructs a transformation using identity orientation and a translation vector. | |
bool | is_identity () const |
Determines whether the transform is identity. | |
POSE3 | transform (const POSE3 &p) const |
Transforms a pose. | |
POSE3 | inverse_transform (const POSE3 &p) const |
Transforms a pose. | |
VECTOR3 | transform_point (const VECTOR3 &p) const |
Transforms a point from one pose to another. | |
VECTOR3 | transform_vector (const VECTOR3 &v) const |
Transforms a vector from one pose to another. | |
VECTOR3 | inverse_transform_point (const VECTOR3 &p) const |
Transforms a point from one pose to another. | |
VECTOR3 | inverse_transform_vector (const VECTOR3 &v) const |
Transforms a vector from one pose to another. | |
SFORCE | transform (const SFORCE &w) const |
Transforms a force from one pose to another. | |
SFORCE | inverse_transform (const SFORCE &w) const |
Transforms a force from one pose to another. | |
SMOMENTUM | transform (const SMOMENTUM &t) const |
Transforms a momentum from one pose to another. | |
SMOMENTUM | inverse_transform (const SMOMENTUM &t) const |
Transforms a momentum from one pose to another. | |
SVELOCITY | transform (const SVELOCITY &t) const |
Transforms a velocity from one pose to another. | |
SVELOCITY | inverse_transform (const SVELOCITY &t) const |
Transforms a velocity from one pose to another. | |
SACCEL | transform (const SACCEL &t) const |
Transforms an acceleration from one pose to another. | |
SACCEL | inverse_transform (const SACCEL &t) const |
Transforms an acceleration from one pose to another. | |
SPATIAL_RB_INERTIA | transform (const SPATIAL_RB_INERTIA &j) const |
Transforms a rigid body inertia from one pose to another. More... | |
SPATIAL_RB_INERTIA | inverse_transform (const SPATIAL_RB_INERTIA &j) const |
Transforms a rigid body inertia from one pose to another. | |
SPATIAL_AB_INERTIA | transform (const SPATIAL_AB_INERTIA &j) const |
Transforms an articulated body inertia from one pose to another. | |
SPATIAL_AB_INERTIA | inverse_transform (const SPATIAL_AB_INERTIA &j) const |
Transforms an articulated body inertia from one pose to another. | |
TRANSFORM3 & | set_identity () |
Sets this matrix to identity. | |
TRANSFORM3 & | invert () |
Special method for inverting a transformation in place. | |
TRANSFORM3 | inverse () const |
TRANSFORM3 & | set (const AANGLE &a) |
Sets this transformation from a axis-angle object only (translation will be zero'd) | |
TRANSFORM3 & | set (const MATRIX3 &m) |
Sets this transformation from a 3x3 rotation matrix only (translation will be zero'd) | |
TRANSFORM3 & | set (const QUAT &q) |
Sets this transformation from a unit quaternion only (translation will be zero'd) | |
TRANSFORM3 & | set (const AANGLE &a, const ORIGIN3 &v) |
TRANSFORM3 & | set (const MATRIX3 &m, const ORIGIN3 &v) |
Sets the transformation from a rotation matrix and translation vector. More... | |
TRANSFORM3 & | set (const QUAT &q, const ORIGIN3 &v) |
Sets the transformation from a unit quaternion and translation vector. | |
TRANSFORM3 & | operator= (const TRANSFORM3 &source) |
TRANSFORM3 | operator* (const TRANSFORM3 &m) const |
Multiplies this transformation by another. More... | |
POSE3 | apply_transform () const |
Applies a transform to a pose. More... | |
POSE3 | apply_inverse_transform () const |
Applies the inverse transform to a pose. More... | |
Static Public Member Functions | |
static ORIGIN3 | interpolate_transform_vector (const TRANSFORM3 &T1, const TRANSFORM3 &T2, REAL t, const ORIGIN3 &o) |
Tranforms a vector with an interpolated transform (between transforms T1 and T2) More... | |
static ORIGIN3 | interpolate_transform_point (const TRANSFORM3 &T1, const TRANSFORM3 &T2, REAL t, const ORIGIN3 &o) |
Tranforms a point with an interpolated pose (between poses T1 and T2) More... | |
static ORIGIN3 | interpolate_inverse_transform_vector (const TRANSFORM3 &T1, const TRANSFORM3 &T2, REAL t, const ORIGIN3 &o) |
Tranforms a vector with the inverse of an interpolated transform (between transforms T1 and T2) More... | |
static ORIGIN3 | interpolate_inverse_transform_point (const TRANSFORM3 &T1, const TRANSFORM3 &T2, REAL t, const ORIGIN3 &o) |
Tranforms a point with the inverse of an interpolated pose (between poses T1 and T2) More... | |
static TRANSFORM3 | identity () |
static bool | rel_equal (const TRANSFORM3 &p1, const TRANSFORM3 &p2, REAL tol=EPS) |
Determines whether two transformations in 3D are relatively equivalent. | |
static TRANSFORM3 | invert (const TRANSFORM3 &m) |
Special method for inverting a transformation. | |
Public Attributes | |
QUAT | q |
the relative orientation | |
ORIGIN3 | x |
the relative origin | |
boost::shared_ptr< const POSE3 > | source |
the "source" pose | |
boost::shared_ptr< const POSE3 > | target |
the "target" pose | |
A transformation between two rigid body poses.
TRANSFORM3::TRANSFORM3 | ( | ) |
Default constructor.
Sets matrix to the identity matrix
References set_identity().
Referenced by invert().
POSE3 TRANSFORM3::apply_inverse_transform | ( | ) | const |
POSE3 TRANSFORM3::apply_transform | ( | ) | const |
|
static |
Tranforms a point with the inverse of an interpolated pose (between poses T1 and T2)
T1 | the pose to use when t=0 |
T2 | the pose to use when t=1 |
t | interpolation value |
o | the point to transform |
References QUAT::invert(), q, QUAT::slerp(), and x.
|
static |
Tranforms a vector with the inverse of an interpolated transform (between transforms T1 and T2)
T1 | the pose to use when t=0 |
T2 | the pose to use when t=1 |
t | interpolation value |
o | the vector to transform |
References QUAT::invert(), q, and QUAT::slerp().
|
static |
Tranforms a point with an interpolated pose (between poses T1 and T2)
T1 | the pose to use when t=0 |
T2 | the pose to use when t=1 |
t | interpolation value |
o | the point to transform |
References q, QUAT::slerp(), and x.
|
static |
Tranforms a vector with an interpolated transform (between transforms T1 and T2)
T1 | the pose to use when t=0 |
T2 | the pose to use when t=1 |
t | interpolation value |
o | the vector to transform |
References q, and QUAT::slerp().
TRANSFORM3 TRANSFORM3::operator* | ( | const TRANSFORM3 & | T | ) | const |
TRANSFORM3 & TRANSFORM3::set | ( | const AANGLE & | a, |
const ORIGIN3 & | v | ||
) |
TRANSFORM3 & TRANSFORM3::set | ( | const MATRIX3 & | m, |
const ORIGIN3 & | v | ||
) |
SPATIAL_RB_INERTIA TRANSFORM3::transform | ( | const SPATIAL_RB_INERTIA & | J | ) | const |
Transforms a rigid body inertia from one pose to another.
The operations for this come from: | E 0 | * | -m*hx eye(3)*m | * | E' 0 | | -E*rx E | | J - m*hx*hx m*hx | | rx*E' E' | which yields: | A m | | B A' | where: A = -m*E*hx*E' + m*E*rx*E' B = m*E*rx*hx*E' + E*J*E' - m*E*hx*hx*E' - m*E*rx*rx*E' + m*E*hx*rx*E'
References SPATIAL_RB_INERTIA::h, SPATIAL_RB_INERTIA::J, SPATIAL_RB_INERTIA::m, SPATIAL_RB_INERTIA::pose, q, source, target, MATRIX3::transpose(), MATRIX3::transpose_mult(), and x.