GAMS  1.2.2
gams::pose::simple_rotate Namespace Reference

For internal use. More...

Functions

double calc_angle (const ReferenceFrameType *self, double rx1, double ry1, double rz1, double rx2, double ry2, double rz2)
 Calculates smallest angle between two AngularVectors. More...
 
void orient_linear_vec (double &x, double &y, double &z, double rx, double ry, double rz, bool reverse=false)
 Rotates a LinearVector according to a AngularVector. More...
 
void transform_angular_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place from its origin frame. More...
 
void transform_angular_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place into its origin frame from this frame. More...
 
void transform_pose_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place from its origin frame Simply applies linear and angular transforms independantly. More...
 
void transform_pose_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place into its origin frame from this frame. More...
 

Detailed Description

For internal use.

Provides implementation of angular and pose transforms for frames where angular transformation is independant of linear. This applies to, for example, Cartesian and GPS frames, but not UTM frames. Inherit from this to use this implementation.

Function Documentation

double gams::pose::simple_rotate::calc_angle ( const ReferenceFrameType self,
double  rx1,
double  ry1,
double  rz1,
double  rx2,
double  ry2,
double  rz2 
)

Calculates smallest angle between two AngularVectors.

Parameters
rx1the starting angular on x axis
ry1the starting angular on y axis
rz1the starting angular on z axis
rx2the ending rotatation on x axis
ry2the ending angular on y axis
rz2the ending angular on z axis
Returns
the difference in radians
void gams::pose::simple_rotate::orient_linear_vec ( double &  x,
double &  y,
double &  z,
double  rx,
double  ry,
double  rz,
bool  reverse = false 
)

Rotates a LinearVector according to a AngularVector.

Parameters
xthe x coordinate to orient (in-place)
ythe y coordinate to orient (in-place)
zthe z coordinate to orient (in-place)
rotthe angular to apply, axis-angle notation
reverseif true, apply angular in opposite direction
void gams::pose::simple_rotate::transform_angular_from_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  orx,
double  ory,
double  orz,
double &  rx,
double &  ry,
double &  rz 
)

Transform AngularVector in-place from its origin frame.

Parameters
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation
void gams::pose::simple_rotate::transform_angular_to_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  orx,
double  ory,
double  orz,
double &  rx,
double &  ry,
double &  rz 
)

Transform AngularVector in-place into its origin frame from this frame.

Parameters
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation
void gams::pose::simple_rotate::transform_pose_from_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  ox,
double  oy,
double  oz,
double  orx,
double  ory,
double  orz,
double &  x,
double &  y,
double &  z,
double &  rx,
double &  ry,
double &  rz,
bool  fixed 
)

Transform pose in-place from its origin frame Simply applies linear and angular transforms independantly.

Parameters
xthe x axis for the coordinate to translate
ythe y axis for the coordinate to translate
zthe z axis for the coordinate to translate
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation
void gams::pose::simple_rotate::transform_pose_to_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  ox,
double  oy,
double  oz,
double  orx,
double  ory,
double  orz,
double &  x,
double &  y,
double &  z,
double &  rx,
double &  ry,
double &  rz,
bool  fixed 
)

Transform pose in-place into its origin frame from this frame.

Simply applies linear and angular transforms independantly

Parameters
xthe x axis for the coordinate to translate
ythe y axis for the coordinate to translate
zthe z axis for the coordinate to translate
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation