Ravelin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TRANSFORM2 Class Reference

A transformation between 2D rigid body poses. More...

#include <Transform2.h>

Public Member Functions

 TRANSFORM2 ()
 Default constructor. More...
 
 TRANSFORM2 (const TRANSFORM2 &source)
 
 TRANSFORM2 (const ROT2 &r, const ORIGIN2 &x)
 Constructs a 2D pose from a rotation and translation vector.
 
 TRANSFORM2 (const ORIGIN2 &x)
 Constructs a 2D pose using identity orientation and a translation vector.
 
 TRANSFORM2 (const ROT2 &r)
 Constructs a 2D pose from a rotation and zero translation.
 
POSE2 transform (const POSE2 &p) const
 Transforms a pose.
 
POSE2 inverse_transform (const POSE2 &p) const
 Transforms a pose.
 
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.
 
TRANSFORM2set_identity ()
 Sets this matrix to identity.
 
TRANSFORM2invert ()
 Special method for inverting a 2D pose.
 
TRANSFORM2 inverse () const
 
TRANSFORM2set (const ROT2 &r, const ORIGIN2 &v)
 Sets the pose from a rotation and translation vector.
 
TRANSFORM2set (const ROT2 &r)
 Sets this pose from a rotation only (translation will be zero'd)
 
TRANSFORM2operator= (const TRANSFORM2 &source)
 
TRANSFORM2 operator* (const TRANSFORM2 &m) const
 Concatenates transformations. More...
 

Static Public Member Functions

static TRANSFORM2 identity ()
 
static bool rel_equal (const TRANSFORM2 &p1, const TRANSFORM2 &p2, REAL tol=EPS)
 Determines whether two poses in 2D are relatively equivalent.
 
static REAL wrap (REAL theta)
 
static TRANSFORM2 invert (const TRANSFORM2 &m)
 Special method for inverting a 2D pose.
 
static ORIGIN2 interpolate_transform_vector (const TRANSFORM2 &T1, const TRANSFORM2 &T2, REAL t, const ORIGIN2 &o)
 Tranforms a vector with an interpolated transform (between transforms T1 and T2) More...
 
static ORIGIN2 interpolate_transform_point (const TRANSFORM2 &T1, const TRANSFORM2 &T2, REAL t, const ORIGIN2 &o)
 Tranforms a point with an interpolated pose (between poses T1 and T2) More...
 
static ORIGIN2 interpolate_inverse_transform_vector (const TRANSFORM2 &T1, const TRANSFORM2 &T2, REAL t, const ORIGIN2 &o)
 Tranforms a vector with the inverse of an interpolated transform (between transforms T1 and T2) More...
 
static ORIGIN2 interpolate_inverse_transform_point (const TRANSFORM2 &T1, const TRANSFORM2 &T2, REAL t, const ORIGIN2 &o)
 Tranforms a point with the inverse of an interpolated pose (between poses T1 and T2) More...
 

Public Attributes

ROT2 r
 the orientation of the pose frame
 
ORIGIN2 x
 the position of the pose frame
 
boost::shared_ptr< const POSE2source
 the source pose
 
boost::shared_ptr< const POSE2target
 the target pose
 

Detailed Description

A transformation between 2D rigid body poses.

Constructor & Destructor Documentation

TRANSFORM2::TRANSFORM2 ( )

Default constructor.

Sets matrix to the identity matrix

References set_identity().

Referenced by invert().

Member Function Documentation

ORIGIN2 TRANSFORM2::interpolate_inverse_transform_point ( const TRANSFORM2 T1,
const TRANSFORM2 T2,
REAL  t,
const ORIGIN2 o 
)
static

Tranforms a point with the inverse of an interpolated pose (between poses T1 and T2)

Parameters
T1the pose to use when t=0
T2the pose to use when t=1
tinterpolation value
othe point to transform
Returns
the transformed point

References r, ROT2::theta, and x.

ORIGIN2 TRANSFORM2::interpolate_inverse_transform_vector ( const TRANSFORM2 T1,
const TRANSFORM2 T2,
REAL  t,
const ORIGIN2 o 
)
static

Tranforms a vector with the inverse of an interpolated transform (between transforms T1 and T2)

Parameters
T1the pose to use when t=0
T2the pose to use when t=1
tinterpolation value
othe vector to transform
Returns
the transformed vector

References r, and ROT2::theta.

ORIGIN2 TRANSFORM2::interpolate_transform_point ( const TRANSFORM2 T1,
const TRANSFORM2 T2,
REAL  t,
const ORIGIN2 o 
)
static

Tranforms a point with an interpolated pose (between poses T1 and T2)

Parameters
T1the pose to use when t=0
T2the pose to use when t=1
tinterpolation value
othe point to transform
Returns
the transformed point

References r, ROT2::theta, and x.

ORIGIN2 TRANSFORM2::interpolate_transform_vector ( const TRANSFORM2 T1,
const TRANSFORM2 T2,
REAL  t,
const ORIGIN2 o 
)
static

Tranforms a vector with an interpolated transform (between transforms T1 and T2)

Parameters
T1the pose to use when t=0
T2the pose to use when t=1
tinterpolation value
othe vector to transform
Returns
the transformed vector

References r, and ROT2::theta.

TRANSFORM2 TRANSFORM2::operator* ( const TRANSFORM2 T) const

Concatenates transformations.

If this transforms from frame b to frame c and T transforms from frame a to frame b, then concatenation transforms from frame a to frame c.

References r, source, target, and x.


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