dtCore::Transform Class Reference

#include <transform.h>

List of all members.

Public Member Functions

 Transform (float tx=0.0f, float ty=0.0f, float tz=0.0f, float h=0.0f, float p=0.0f, float r=0.0f, float sx=1.0f, float sy=1.0f, float sz=1.0f)
 Transform (const Transform &that)
virtual ~Transform ()
virtual void Set (float tx, float ty, float tz, float h, float p, float r, float sx=1.0f, float sy=1.0f, float sz=1.0f)
 Set both translation and rotation methods.
virtual void Set (const osg::Vec3 &xyz, const osg::Vec3 &rotation, const osg::Vec3 &scale)
 Set both translation and rotation methods.
virtual void Set (const osg::Vec3 &xyz, const osg::Matrix &rotation, const osg::Vec3 &scale)
 Set both translation and rotation methods.
virtual void Set (const osg::Matrix &mat)
 Set both translation and rotation methods.
virtual void SetTranslation (float tx, float ty, float tz)
 Set only translation methods.
virtual void SetTranslation (const osg::Vec3 &xyz)
 Set only translation methods.
virtual void SetRotation (float h, float p, float r)
 Set the rotation using heading, pitch, roll (in degrees).
virtual void SetRotation (const osg::Vec3 &hpr)
 Set the rotation using a osg::Vec3 as HPR (in degrees).
virtual void SetRotation (const osg::Matrix &rotation)
 Set the rotation using a rotation matrix.
virtual void SetScale (float sx, float sy, float sz)
 Set the uniform scale factor.
virtual void SetScale (const osg::Vec3 &scale)
 Set the uniform scale factor.
void Get (float &tx, float &ty, float &tz, float &h, float &p, float &r, float &sx, float &sy, float &sz) const
 Get translation and rotation methods.
void Get (osg::Vec3 &xyz, osg::Matrix &rotation, osg::Vec3 &scale) const
 Get translation and rotation methods.
void Get (osg::Vec3 &xyz, osg::Vec3 &hpr, osg::Vec3 &scale) const
 Get translation and rotation methods.
void Get (osg::Matrix &matrix) const
 Get translation and rotation methods.
void GetTranslation (osg::Vec3 &translation) const
 Get only translation methods.
void GetTranslation (float &tx, float &ty, float &tz) const
 Get only translation methods.
osg::Vec3 & GetTranslation ()
 
Returns:
the translation vector.

const osg::Vec3 & GetTranslation () const
void GetRotation (float &h, float &p, float &r) const
 Get only rotation methods.
void GetRotation (osg::Vec3 &hpr) const
 Get only rotation methods.
void GetRotation (osg::Matrix &rotation) const
 Get only rotation methods.
osg::Matrix & GetRotation ()
 Get only rotation matrix. This returns the actual stored matrix.
void GetScale (float &sx, float &sy, float &sz) const
 fills params with the current scale of the transform
void GetScale (osg::Vec3 &scale) const
 fills params with the current scale of the transform
osg::Vec3 & GetScale ()
 
Returns:
the scale vector.

void SetLookAt (const osg::Vec3 &xyz, const osg::Vec3 &lookAtXyz, const osg::Vec3 &upVec)
 sets this matrix to be used for to set the camera view
void SetLookAt (float posX, float posY, float posZ, float lookAtX, float lookAtY, float lookAtZ, float upVecX, float upVecY, float upVecZ)
 sets this matrix to be used for to set the camera view
bool EpsilonEquals (const Transform &transform, float epsilon=0.0001f) const
 checks to see if the param transform is within epsilon of this transform slightly more sophisticated as using operator ==
Transformoperator= (const Transform &)
bool operator== (const Transform &)

Protected Attributes

osg::Vec3 mTranslation
 Internal storage of translation.
osg::Matrix mRotation
 Internal storage of the rotation.
osg::Vec3 mScale
 Internal storage of scale.


Constructor & Destructor Documentation

Transform::Transform ( float  tx = 0.0f,
float  ty = 0.0f,
float  tz = 0.0f,
float  h = 0.0f,
float  p = 0.0f,
float  r = 0.0f,
float  sx = 1.0f,
float  sy = 1.0f,
float  sz = 1.0f 
)

Transform::Transform ( const Transform that  ) 

Transform::~Transform (  )  [virtual]


Member Function Documentation

void Transform::Set ( float  tx,
float  ty,
float  tz,
float  h,
float  p,
float  r,
float  sx = 1.0f,
float  sy = 1.0f,
float  sz = 1.0f 
) [virtual]

Set both translation and rotation methods.

void Transform::Set ( const osg::Vec3 &  xyz,
const osg::Vec3 &  rotation,
const osg::Vec3 &  scale 
) [virtual]

Set both translation and rotation methods.

void Transform::Set ( const osg::Vec3 &  xyz,
const osg::Matrix &  rotation,
const osg::Vec3 &  scale 
) [virtual]

Set both translation and rotation methods.

void Transform::Set ( const osg::Matrix &  mat  )  [virtual]

Set both translation and rotation methods.

virtual void dtCore::Transform::SetTranslation ( float  tx,
float  ty,
float  tz 
) [inline, virtual]

Set only translation methods.

virtual void dtCore::Transform::SetTranslation ( const osg::Vec3 &  xyz  )  [inline, virtual]

Set only translation methods.

void Transform::SetRotation ( float  h,
float  p,
float  r 
) [virtual]

Set the rotation using heading, pitch, roll (in degrees).

Parameters:
h : heading, in degrees
p : pitch, in degrees
r : roll, in degrees

void Transform::SetRotation ( const osg::Vec3 &  hpr  )  [virtual]

Set the rotation using a osg::Vec3 as HPR (in degrees).

Parameters:
hpr : corresponds to the heading, pitch, roll, in that order, in degrees

virtual void dtCore::Transform::SetRotation ( const osg::Matrix &  rotation  )  [inline, virtual]

Set the rotation using a rotation matrix.

virtual void dtCore::Transform::SetScale ( float  sx,
float  sy,
float  sz 
) [inline, virtual]

Set the uniform scale factor.

virtual void dtCore::Transform::SetScale ( const osg::Vec3 &  scale  )  [inline, virtual]

Set the uniform scale factor.

void Transform::Get ( float &  tx,
float &  ty,
float &  tz,
float &  h,
float &  p,
float &  r,
float &  sx,
float &  sy,
float &  sz 
) const

Get translation and rotation methods.

void Transform::Get ( osg::Vec3 &  xyz,
osg::Matrix &  rotation,
osg::Vec3 &  scale 
) const

Get translation and rotation methods.

void Transform::Get ( osg::Vec3 &  xyz,
osg::Vec3 &  hpr,
osg::Vec3 &  scale 
) const

Get translation and rotation methods.

void Transform::Get ( osg::Matrix &  matrix  )  const

Get translation and rotation methods.

void dtCore::Transform::GetTranslation ( osg::Vec3 &  translation  )  const [inline]

Get only translation methods.

void Transform::GetTranslation ( float &  tx,
float &  ty,
float &  tz 
) const

Get only translation methods.

osg::Vec3& dtCore::Transform::GetTranslation (  )  [inline]

Returns:
the translation vector.

const osg::Vec3& dtCore::Transform::GetTranslation (  )  const [inline]

void Transform::GetRotation ( float &  h,
float &  p,
float &  r 
) const

Get only rotation methods.

void Transform::GetRotation ( osg::Vec3 &  hpr  )  const

Get only rotation methods.

void dtCore::Transform::GetRotation ( osg::Matrix &  rotation  )  const [inline]

Get only rotation methods.

osg::Matrix& dtCore::Transform::GetRotation (  )  [inline]

Get only rotation matrix. This returns the actual stored matrix.

void Transform::GetScale ( float &  sx,
float &  sy,
float &  sz 
) const

fills params with the current scale of the transform

void dtCore::Transform::GetScale ( osg::Vec3 &  scale  )  const [inline]

fills params with the current scale of the transform

osg::Vec3& dtCore::Transform::GetScale (  )  [inline]

Returns:
the scale vector.

void Transform::SetLookAt ( const osg::Vec3 &  xyz,
const osg::Vec3 &  lookAtXyz,
const osg::Vec3 &  upVec 
)

sets this matrix to be used for to set the camera view

void Transform::SetLookAt ( float  posX,
float  posY,
float  posZ,
float  lookAtX,
float  lookAtY,
float  lookAtZ,
float  upVecX,
float  upVecY,
float  upVecZ 
)

sets this matrix to be used for to set the camera view

bool Transform::EpsilonEquals ( const Transform transform,
float  epsilon = 0.0001f 
) const

checks to see if the param transform is within epsilon of this transform slightly more sophisticated as using operator ==

Transform & Transform::operator= ( const Transform rhs  ) 

bool Transform::operator== ( const Transform rhs  ) 


Member Data Documentation

osg::Vec3 dtCore::Transform::mTranslation [protected]

Internal storage of translation.

osg::Matrix dtCore::Transform::mRotation [protected]

Internal storage of the rotation.

osg::Vec3 dtCore::Transform::mScale [protected]

Internal storage of scale.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008