NodeTransform Class Reference

\clas NodeTransform Skeleton.hh common/common.hh More...

#include <Skeleton.hh>

Public Types

enum  TransformType { TRANSLATE , ROTATE , SCALE , MATRIX }
 Enumeration of the transform types. More...
 

Public Member Functions

 NodeTransform (const ignition::math::Matrix4d &_mat, const std::string &_sid="_default_", TransformType _type=MATRIX)
 Constructor.
 
 NodeTransform (TransformType _type=MATRIX)
 Constructor.
 
 ~NodeTransform ()
 Destructor. It does nothing.
 
std::string GetSID ()
 Returns thr SID.
 
ignition::math::Matrix4d GetTransform () const
 Returns the transformation matrix.
 
TransformType GetType ()
 Returns the transformation type.
 
ignition::math::Matrix4d operator() ()
 Matrix cast operator.
 
ignition::math::Matrix4d operator* (const ignition::math::Matrix4d &_m)
 Matrix multiplication operator.
 
ignition::math::Matrix4d operator* (NodeTransform _t)
 Node transform multiplication operator.
 
void PrintSource ()
 Prints the transform matrix to std::err stream.
 
void RecalculateMatrix ()
 Sets the transform matrix from the source according to the type.
 
void Set (const ignition::math::Matrix4d &_mat)
 Assign a transformation.
 
void SetComponent (unsigned int _idx, double _value)
 Set a transformation matrix component value.
 
void SetSID (std::string _sid)
 Set the SID.
 
void SetSourceValues (const ignition::math::Matrix4d &_mat)
 Set source data values param[in] _mat the values.
 
void SetSourceValues (const ignition::math::Vector3d &_axis, const double _angle)
 Sets source matrix values from roation.
 
void SetSourceValues (const ignition::math::Vector3d &_vec)
 Set source data values.
 
void SetType (TransformType _type)
 Set transform type.
 

Protected Attributes

std::string sid
 the sid
 
std::vector< double > source
 source data values (can be a matrix, a position or rotation)
 
ignition::math::Matrix4d transform
 transform
 
TransformType type
 transform type
 

Detailed Description

\clas NodeTransform Skeleton.hh common/common.hh

A transformation node

Member Enumeration Documentation

◆ TransformType

Enumeration of the transform types.

Enumerator
TRANSLATE 
ROTATE 
SCALE 
MATRIX 

Constructor & Destructor Documentation

◆ NodeTransform() [1/2]

NodeTransform ( TransformType _type = MATRIX)
explicit

Constructor.

Parameters
[in]_typethe type of transform

◆ NodeTransform() [2/2]

NodeTransform ( const ignition::math::Matrix4d & _mat,
const std::string & _sid = "_default_",
TransformType _type = MATRIX )

Constructor.

Parameters
[in]_matthe matrix
[in]_sididentifier
[in]_typethe type of transform

◆ ~NodeTransform()

Destructor. It does nothing.

Member Function Documentation

◆ GetSID()

std::string GetSID ( )

Returns thr SID.

Returns
the SID

◆ GetTransform()

ignition::math::Matrix4d GetTransform ( ) const

Returns the transformation matrix.

Returns
The transform matrix

◆ GetType()

TransformType GetType ( )

Returns the transformation type.

Returns
the type

◆ operator()()

ignition::math::Matrix4d operator() ( )

Matrix cast operator.

Returns
the transform

◆ operator*() [1/2]

ignition::math::Matrix4d operator* ( const ignition::math::Matrix4d & _m)

Matrix multiplication operator.

Parameters
[in]_ma matrix
Returns
transform matrix multiplied by _m

◆ operator*() [2/2]

ignition::math::Matrix4d operator* ( NodeTransform _t)

Node transform multiplication operator.

Parameters
[in]_ta transform
Returns
transform matrix multiplied by _t's transform

◆ PrintSource()

void PrintSource ( )

Prints the transform matrix to std::err stream.

◆ RecalculateMatrix()

void RecalculateMatrix ( )

Sets the transform matrix from the source according to the type.

◆ Set()

void Set ( const ignition::math::Matrix4d & _mat)

Assign a transformation.

Parameters
[in]_matthe transform

◆ SetComponent()

void SetComponent ( unsigned int _idx,
double _value )

Set a transformation matrix component value.

Parameters
[in]_idxthe component index
[in]_valuethe value

◆ SetSID()

void SetSID ( std::string _sid)

Set the SID.

Parameters
[in]_sidthe sid

◆ SetSourceValues() [1/3]

void SetSourceValues ( const ignition::math::Matrix4d & _mat)

Set source data values param[in] _mat the values.

◆ SetSourceValues() [2/3]

void SetSourceValues ( const ignition::math::Vector3d & _axis,
const double _angle )

Sets source matrix values from roation.

Parameters
[in]_axisof rotation
[in]_angleof rotation

◆ SetSourceValues() [3/3]

void SetSourceValues ( const ignition::math::Vector3d & _vec)

Set source data values.

Parameters
[in]_vecVector to set source data values from.

◆ SetType()

void SetType ( TransformType _type)

Set transform type.

Parameters
[in]_typethe type

Member Data Documentation

◆ sid

std::string sid
protected

the sid

◆ source

std::vector<double> source
protected

source data values (can be a matrix, a position or rotation)

◆ transform

ignition::math::Matrix4d transform
protected

transform

◆ type

TransformType type
protected

transform type


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