Ravelin
|
A 2D rigid body pose. More...
#include <Pose2.h>
Public Member Functions | |
POSE2 () | |
Default constructor. More... | |
POSE2 (const POSE2 &source) | |
POSE2 (const ROT2 &r, const ORIGIN2 &x, boost::shared_ptr< const POSE2 > relative_pose=boost::shared_ptr< const POSE2 >()) | |
Constructs a 2D pose from a rotation and translation vector. | |
POSE2 (const ORIGIN2 &x, boost::shared_ptr< const POSE2 > relative_pose=boost::shared_ptr< const POSE2 >()) | |
Constructs a 2D pose using identity orientation and a translation vector. | |
POSE2 (const ROT2 &r, boost::shared_ptr< const POSE2 > relative_pose=boost::shared_ptr< const POSE2 >()) | |
Constructs a 2D pose from a rotation and zero translation. | |
VECTOR2 | transform_point (const VECTOR2 &v) const |
Transforms a point from one pose to another. | |
VECTOR2 | transform_vector (const VECTOR2 &v) const |
Transforms a vector from one pose to another. | |
VECTOR2 | inverse_transform_point (const VECTOR2 &v) const |
Transforms a point from one pose to another. | |
VECTOR2 | inverse_transform_vector (const VECTOR2 &v) const |
Transforms a vector from one pose to another. | |
POSE2 & | set_identity () |
Sets this matrix to identity. | |
POSE2 & | invert () |
Special method for inverting a 2D pose in place. | |
POSE2 | inverse () const |
POSE2 & | set (const ROT2 &r, const ORIGIN2 &v) |
Sets the pose from a rotation and translation vector. | |
POSE2 & | set (const ROT2 &r) |
Sets this pose from a rotation only (translation will be zero'd) | |
POSE2 & | operator= (const POSE2 &source) |
POSE2 | operator* (const POSE2 &m) const |
Transforms this pose by another. | |
Static Public Member Functions | |
static POSE2 | identity () |
static REAL | wrap (REAL theta) |
Wraps an angle to [-pi, pi]. | |
static bool | rel_equal (const POSE2 &p1, const POSE2 &p2, REAL tol=EPS) |
Determines whether two poses in 2D are relatively equivalent. | |
static VECTOR2 | transform_point (boost::shared_ptr< const POSE2 > target, const VECTOR2 &v) |
Transforms a point from one pose to another. | |
static VECTOR2 | transform_vector (boost::shared_ptr< const POSE2 > target, const VECTOR2 &v) |
Applies this pose to a vector. | |
static POSE2 | invert (const POSE2 &m) |
Special method for inverting a 2D pose. | |
static VECTOR2 | interpolate_transform_vector (const POSE2 &P1, const POSE2 &P2, REAL t, const ORIGIN2 &o) |
Tranforms a vector with an interpolated pose (between poses P1 and P2) More... | |
static VECTOR2 | interpolate_transform_point (const POSE2 &P1, const POSE2 &P2, REAL t, const ORIGIN2 &o) |
Tranforms a point with an interpolated pose (between poses P1 and P2) More... | |
Public Attributes | |
ROT2 | r |
the orientation of the pose frame | |
ORIGIN2 | x |
the position of the pose frame | |
boost::shared_ptr< const POSE2 > | rpose |
the pose that this pose is relative to (if any) | |
A 2D rigid body pose.
POSE2::POSE2 | ( | ) |
Default constructor.
Sets matrix to the identity matrix
References set_identity().
Referenced by invert(), and operator*().
|
static |
Tranforms a point with an interpolated pose (between poses P1 and P2)
P1 | the pose to use when t=0 |
P2 | the pose to use when t=1 |
t | interpolation value |
o | the point to transform |
References r, rpose, ROT2::theta, wrap(), and x.
|
static |
Tranforms a vector with an interpolated pose (between poses P1 and P2)
P1 | the pose to use when t=0 |
P2 | the pose to use when t=1 |
t | interpolation value |
o | the vector to transform |
References r, rpose, ROT2::theta, and wrap().