NL3D::CTransformableUser Class Reference

#include <transformable_user.h>

Inheritance diagram for NL3D::CTransformableUser:

NL3D::UTransformable NL3D::CBoneUser NL3D::CTransformUser NL3D::CCameraUser NL3D::CInstanceUser NL3D::CParticleSystemInstanceUser NL3D::CPointLightUser NL3D::CSkeletonUser NL3D::CWaterInstanceUser

Detailed Description

UTransformable implementation.
Author:
Lionel Berenguier

Nevrax France

Date:
2001

Definition at line 46 of file transformable_user.h.

Public Types

enum  TTransformMode { DirectMatrix = 0, RotEuler, RotQuat, TransformModeCount }

Public Member Functions

Object
 CTransformableUser (ITransformable *trans)
 Give a ITransformable. CTransformableUser DO NOT OWNS IT!

virtual ~CTransformableUser ()
 Give a ITransformable. CTransformableUser DO NOT OWNS IT!


Protected Attributes

ITransformable_Transformable


Member Enumeration Documentation

enum NL3D::UTransformable::TTransformMode [inherited]
 

Enumeration values:
DirectMatrix 
RotEuler 
RotQuat 
TransformModeCount 

Definition at line 66 of file u_transformable.h.

00067         {
00068                 DirectMatrix=0,         // DirectMatrixMode .
00069                 RotEuler,                       // Matrix is computed from sperated composantes, with euler rotation.
00070                 RotQuat,                        // Matrix is computed from sperated composantes, with quat rotation (default).
00071 
00072                 TransformModeCount
00073         };


Constructor & Destructor Documentation

NL3D::CTransformableUser::CTransformableUser ITransformable trans  )  [inline]
 

Give a ITransformable. CTransformableUser DO NOT OWNS IT!

Definition at line 58 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, nlassert, and uint.

00059         {
00060                 NL3D_MEM_TRANSFORMABLE
00061                 nlassert(trans);
00062                 _Transformable= trans;
00063 
00064                 // Same enums!!
00065                 nlassert((uint)UTransformable::TransformModeCount == (uint)ITransformable::TransformModeCount);
00066         }

virtual NL3D::CTransformableUser::~CTransformableUser  )  [inline, virtual]
 

Give a ITransformable. CTransformableUser DO NOT OWNS IT!

Definition at line 67 of file transformable_user.h.

References _Transformable, and NL3D_MEM_TRANSFORMABLE.

00068         {
00069                 NL3D_MEM_TRANSFORMABLE
00070                 _Transformable= NULL;
00071         }


Member Function Documentation

virtual const CMatrix& NL3D::CTransformableUser::getMatrix  )  const [inline, virtual]
 

Get the matrix, compute her if necessary (work in all modes).

Implements NL3D::UTransformable.

Definition at line 81 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getMatrix(), and NL3D_MEM_TRANSFORMABLE.

00082         {
00083                 NL3D_MEM_TRANSFORMABLE
00084                 return _Transformable->getMatrix();
00085         }

virtual CVector NL3D::CTransformableUser::getPivot  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 195 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getPivot(), and NL3D_MEM_TRANSFORMABLE.

00196         {
00197                 NL3D_MEM_TRANSFORMABLE
00198                 return _Transformable->getPivot();
00199         }

virtual void NL3D::CTransformableUser::getPivot CVector pivot  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 169 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getPivot(), and NL3D_MEM_TRANSFORMABLE.

00170         {
00171                 NL3D_MEM_TRANSFORMABLE
00172                 _Transformable->getPivot(pivot);
00173         }

const char * NL3D::UTransformable::getPivotValueName  )  [static, inherited]
 

Definition at line 55 of file transformable_user.cpp.

References NL3D_MEM_TRANSFORMABLE.

00056 {
00057         NL3D_MEM_TRANSFORMABLE
00058         return ITransformable::getPivotValueName();
00059 }

virtual CVector NL3D::CTransformableUser::getPos  )  [inline, virtual]
 

Work only in Rot* mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 175 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getPos(), and NL3D_MEM_TRANSFORMABLE.

Referenced by NL3D::CInstanceUser::startAsyncTextureLoading().

00176         {
00177                 NL3D_MEM_TRANSFORMABLE
00178                 return _Transformable->getPos();
00179         }

virtual void NL3D::CTransformableUser::getPos CVector pos  )  [inline, virtual]
 

Work only in Rot* mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 149 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getPos(), and NL3D_MEM_TRANSFORMABLE.

00150         {
00151                 NL3D_MEM_TRANSFORMABLE
00152                 _Transformable->getPos(pos);
00153         }

const char * NL3D::UTransformable::getPosValueName  )  [static, inherited]
 

Definition at line 35 of file transformable_user.cpp.

References NL3D_MEM_TRANSFORMABLE.

00036 {
00037         NL3D_MEM_TRANSFORMABLE
00038         return ITransformable::getPosValueName ();
00039 }

virtual CVector NL3D::CTransformableUser::getRotEuler  )  [inline, virtual]
 

Work only in RotEuler mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 180 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getRotEuler(), and NL3D_MEM_TRANSFORMABLE.

00181         {
00182                 NL3D_MEM_TRANSFORMABLE
00183                 return _Transformable->getRotEuler();
00184         }

virtual void NL3D::CTransformableUser::getRotEuler CVector rot  )  [inline, virtual]
 

Work only in RotEuler mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 154 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getRotEuler(), and NL3D_MEM_TRANSFORMABLE.

00155         {
00156                 NL3D_MEM_TRANSFORMABLE
00157                 _Transformable->getRotEuler(rot);
00158         }

const char * NL3D::UTransformable::getRotEulerValueName  )  [static, inherited]
 

Definition at line 40 of file transformable_user.cpp.

References NL3D_MEM_TRANSFORMABLE.

00041 {
00042         NL3D_MEM_TRANSFORMABLE
00043         return ITransformable::getRotEulerValueName();
00044 }

virtual CMatrix::TRotOrder NL3D::CTransformableUser::getRotOrder  )  [inline, virtual]
 

get the current rotorder (information vlaid only when RotEuler mode).

Implements NL3D::UTransformable.

Definition at line 143 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getRotOrder(), and NL3D_MEM_TRANSFORMABLE.

00144         {
00145                 NL3D_MEM_TRANSFORMABLE
00146                 return _Transformable->getRotOrder();
00147         }

virtual CQuat NL3D::CTransformableUser::getRotQuat  )  [inline, virtual]
 

Work only in RotQuat mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 185 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getRotQuat(), and NL3D_MEM_TRANSFORMABLE.

00186         {
00187                 NL3D_MEM_TRANSFORMABLE
00188                 return _Transformable->getRotQuat();
00189         }

virtual void NL3D::CTransformableUser::getRotQuat CQuat quat  )  [inline, virtual]
 

Work only in RotQuat mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 159 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getRotQuat(), and NL3D_MEM_TRANSFORMABLE.

00160         {
00161                 NL3D_MEM_TRANSFORMABLE
00162                 _Transformable->getRotQuat(quat);
00163         }

const char * NL3D::UTransformable::getRotQuatValueName  )  [static, inherited]
 

Definition at line 45 of file transformable_user.cpp.

References NL3D_MEM_TRANSFORMABLE.

00046 {
00047         NL3D_MEM_TRANSFORMABLE
00048         return ITransformable::getRotQuatValueName();
00049 }

virtual CVector NL3D::CTransformableUser::getScale  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 190 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getScale(), and NL3D_MEM_TRANSFORMABLE.

00191         {
00192                 NL3D_MEM_TRANSFORMABLE
00193                 return _Transformable->getScale();
00194         }

virtual void NL3D::CTransformableUser::getScale CVector scale  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 164 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getScale(), and NL3D_MEM_TRANSFORMABLE.

00165         {
00166                 NL3D_MEM_TRANSFORMABLE
00167                 _Transformable->getScale(scale);
00168         }

const char * NL3D::UTransformable::getScaleValueName  )  [static, inherited]
 

Definition at line 50 of file transformable_user.cpp.

References NL3D_MEM_TRANSFORMABLE.

00051 {
00052         NL3D_MEM_TRANSFORMABLE
00053         return ITransformable::getScaleValueName();
00054 }

virtual TTransformMode NL3D::CTransformableUser::getTransformMode  )  [inline, virtual]
 

get the current transform mode.

Implements NL3D::UTransformable.

Definition at line 138 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::getTransformMode(), NL3D_MEM_TRANSFORMABLE, and uint.

00139         {
00140                 NL3D_MEM_TRANSFORMABLE
00141                 return (TTransformMode)(uint)_Transformable->getTransformMode();
00142         }

virtual void NL3D::CTransformableUser::lookAt const CVector eye,
const CVector target,
float  roll = 0.f
[inline, virtual]
 

Setup Matrix by the lookAt method. Work only in DirectMatrix mode and RotQuat mode (not euler...).

Parameters:
eye is the coordinate of the object.
target is the point the object look at.
roll is the roll angle in radian along the object's Y axis.

Implements NL3D::UTransformable.

Definition at line 206 of file transformable_user.h.

References _Transformable, NL3D::ITransformable::lookAt(), and NL3D_MEM_TRANSFORMABLE.

00207         {
00208                 NL3D_MEM_TRANSFORMABLE
00209                 _Transformable->lookAt(eye, target, roll);
00210         }

virtual void NL3D::CTransformableUser::setMatrix const CMatrix mat  )  [inline, virtual]
 

Work only in DirecTMatrix mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 76 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, and NL3D::ITransformable::setMatrix().

00077         {
00078                 NL3D_MEM_TRANSFORMABLE
00079                 _Transformable->setMatrix(mat);
00080         }

void NL3D::UTransformable::setPivot float  px,
float  py,
float  pz
[inline, inherited]
 

Work only in Rot* mode (nlassert).

Definition at line 108 of file u_transformable.h.

References NL3D::UTransformable::setPivot().

00108 {setPivot(CVector(px, py, pz));}

virtual void NL3D::CTransformableUser::setPivot const CVector pivot  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 132 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, and NL3D::ITransformable::setPivot().

00133         {
00134                 NL3D_MEM_TRANSFORMABLE
00135                 _Transformable->setPivot(pivot);
00136         }

void NL3D::UTransformable::setPos float  px,
float  py,
float  pz
[inline, inherited]
 

Work only in Rot* mode(nlassert).

Definition at line 86 of file u_transformable.h.

References NL3D::UTransformable::setPos().

00086 {setPos(CVector(px, py, pz));}

virtual void NL3D::CTransformableUser::setPos const CVector pos  )  [inline, virtual]
 

Work only in Rot* mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 97 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, and NL3D::ITransformable::setPos().

00098         {
00099                 NL3D_MEM_TRANSFORMABLE
00100                 _Transformable->setPos(pos);
00101         }

void NL3D::UTransformable::setRotEuler float  rx,
float  ry,
float  rz
[inline, inherited]
 

Work only in RotEuler mode(nlassert).

Definition at line 90 of file u_transformable.h.

References NL3D::UTransformable::setRotEuler().

00090 {setRotEuler(CVector(rx, ry, rz));}

virtual void NL3D::CTransformableUser::setRotEuler const CVector rot  )  [inline, virtual]
 

Work only in RotEuler mode(nlassert).

Implements NL3D::UTransformable.

Definition at line 102 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, and NL3D::ITransformable::setRotEuler().

00103         {
00104                 NL3D_MEM_TRANSFORMABLE
00105                 _Transformable->setRotEuler(rot);
00106         }

virtual void NL3D::CTransformableUser::setRotQuat const CVector jdir,
const CVector vup
[inline, virtual]
 

Work only in RotQuat mode (nlassert). Build a quaternion from a forward direction (a J vector). the roll is determined with help of the vector up vup... vectors do not need to be noramlized.

Implements NL3D::UTransformable.

Definition at line 120 of file transformable_user.h.

References NL3D_MEM_TRANSFORMABLE, and setRotQuat().

00121         {
00122                 NL3D_MEM_TRANSFORMABLE
00123                 CMatrix mat;
00124                 mat.setRot(CVector::I, jdir, vup);
00125                 mat.normalize(CMatrix::YZX);
00126                 setRotQuat(mat.getRot());
00127         }

virtual void NL3D::CTransformableUser::setRotQuat const CVector jdir  )  [inline, virtual]
 

Work only in RotQuat mode (nlassert). Build a quaternion from a forward direction (a J vector). there is no roll... jdir do not need to be noramlized.

Implements NL3D::UTransformable.

Definition at line 112 of file transformable_user.h.

References NL3D_MEM_TRANSFORMABLE, and setRotQuat().

00113         {
00114                 NL3D_MEM_TRANSFORMABLE
00115                 CMatrix mat;
00116                 mat.setRot(CVector::I, jdir, CVector::K);
00117                 mat.normalize(CMatrix::YZX);
00118                 setRotQuat(mat.getRot());
00119         }

virtual void NL3D::CTransformableUser::setRotQuat const CQuat quat  )  [inline, virtual]
 

Work only in RotQuat mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 107 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, and NL3D::ITransformable::setRotQuat().

Referenced by setRotQuat().

00108         {
00109                 NL3D_MEM_TRANSFORMABLE
00110                 _Transformable->setRotQuat(quat);
00111         }

void NL3D::UTransformable::setScale float  sx,
float  sy,
float  sz
[inline, inherited]
 

Work only in Rot* mode (nlassert).

Definition at line 104 of file u_transformable.h.

References NL3D::UTransformable::setScale().

00104 {setScale(CVector(sx, sy, sz));}

virtual void NL3D::CTransformableUser::setScale const CVector scale  )  [inline, virtual]
 

Work only in Rot* mode (nlassert).

Implements NL3D::UTransformable.

Definition at line 128 of file transformable_user.h.

References _Transformable, and NL3D::ITransformable::setScale().

00129         {
00130                 _Transformable->setScale(scale);
00131         }

virtual void NL3D::CTransformableUser::setTransformMode TTransformMode  mode,
CMatrix::TRotOrder  ro = CMatrix::ZXY
[inline, virtual]
 

Change the transform mode. Components or matrix are not reseted.

Implements NL3D::UTransformable.

Definition at line 92 of file transformable_user.h.

References _Transformable, NL3D_MEM_TRANSFORMABLE, NL3D::ITransformable::setTransformMode(), and uint.

00093         {
00094                 NL3D_MEM_TRANSFORMABLE
00095                 _Transformable->setTransformMode((ITransformable::TTransformMode)(uint)mode, ro);
00096         }


Field Documentation

ITransformable* NL3D::CTransformableUser::_Transformable [protected]
 

Definition at line 50 of file transformable_user.h.

Referenced by CTransformableUser(), getMatrix(), getPivot(), getPos(), getRotEuler(), getRotOrder(), getRotQuat(), getScale(), getTransformMode(), lookAt(), setMatrix(), setPivot(), setPos(), setRotEuler(), setRotQuat(), setScale(), setTransformMode(), and ~CTransformableUser().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 08:16:26 2004 for NeL by doxygen 1.3.6