#include <transformable_user.h>
Inheritance diagram for NL3D::CTransformableUser:
Nevrax France
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 |
|
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 }; |
|
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 } |
|
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 } |
|
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 } |
|
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 } |
|
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 } |
|
Definition at line 55 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00056 { 00057 NL3D_MEM_TRANSFORMABLE 00058 return ITransformable::getPivotValueName(); 00059 } |
|
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 } |
|
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 } |
|
Definition at line 35 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00036 { 00037 NL3D_MEM_TRANSFORMABLE 00038 return ITransformable::getPosValueName (); 00039 } |
|
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 } |
|
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 } |
|
Definition at line 40 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00041 { 00042 NL3D_MEM_TRANSFORMABLE 00043 return ITransformable::getRotEulerValueName(); 00044 } |
|
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 } |
|
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 } |
|
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 } |
|
Definition at line 45 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00046 { 00047 NL3D_MEM_TRANSFORMABLE 00048 return ITransformable::getRotQuatValueName(); 00049 } |
|
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 } |
|
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 } |
|
Definition at line 50 of file transformable_user.cpp. References NL3D_MEM_TRANSFORMABLE.
00051 { 00052 NL3D_MEM_TRANSFORMABLE 00053 return ITransformable::getScaleValueName(); 00054 } |
|
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 } |
|
Setup Matrix by the lookAt method. Work only in DirectMatrix mode and RotQuat mode (not euler...).
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 } |
|
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 } |
|
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));} |
|
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 } |
|
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));} |
|
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 } |
|
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));} |
|
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 } |
|
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 } |
|
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 } |
|
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 } |
|
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));} |
|
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 } |
|
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 } |
|
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(). |