This is an object class that describes a transform, but the input data is a matrix.
More...
|
| virtual void | reset () |
| virtual void | initComponent () |
| virtual void | updateComponent () |
| virtual core::vector3df | getRelativePosition () |
|
core::vector3df | getPosition () |
|
core::vector3df | getRotation () |
|
core::vector3df | getScale () |
| virtual void | setRelativeTransform (const core::matrix4 &mat) |
| virtual const core::matrix4 & | getRelativeTransform () |
| virtual void | getRelativeTransform (core::matrix4 &matrix) |
| virtual CObjectSerializable * | createSerializable () |
|
const core::vector3df & | getPosition () |
|
void | setPosition (const core::vector3df &pos) |
|
const core::vector3df & | getRotation () |
|
const core::vector3df & | getScale () |
|
void | setScale (const core::vector3df &scale) |
|
void | setRotation (const core::vector3df &eulerDeg) |
|
void | setRotation (const core::quaternion &q) |
|
float | getYaw () |
|
void | setYaw (float deg) |
|
float | getPitch () |
|
void | setPitch (float deg) |
|
float | getRoll () |
|
void | setRoll (float deg) |
|
void | setOrientation (const core::vector3df &front, const core::vector3df &up) |
|
void | lookAt (const core::vector3df &position) |
|
void | getRotation (core::quaternion &q) |
|
core::quaternion | getRotationQuaternion () |
|
void | getFront (core::vector3df &front) |
|
core::vector3df | getFront () |
|
void | getUp (core::vector3df &up) |
|
core::vector3df | getUp () |
|
void | getRight (core::vector3df &right) |
|
core::vector3df | getRight () |
| virtual void | loadSerializable (CObjectSerializable *object) |
|
void | attachTransform (CEntity *entity) |
|
core::vector3df | getWorldPosition () |
|
void | setChanged (bool b) |
|
bool | hasChanged () |
|
bool | isAttached () |
|
bool | isWorldTransform () |
|
void | setIsWorldTransform (bool b) |
|
CTransform * | getParent () |
|
CGameObject * | getParentObject () |
|
CEntity * | getParentEntity () |
|
core::matrix4 | calcWorldTransform () |
|
void | setWorldMatrix (const core::matrix4 &world) |
|
const char * | getName () |
| virtual void | startComponent () |
| virtual void | endUpdate () |
|
virtual void | onEnable (bool b) |
|
virtual void | onUpdateCullingLayer (u32 mask) |
|
void | setEnable (bool b) |
|
bool | isEnable () |
|
CGameObject * | getGameObject () |
|
void | setEnableSerializable (bool b) |
|
bool | isSerializable () |
|
void | addLinkComponent (CComponentSystem *comp) |
|
void | removeAllLink () |
|
virtual | ~IActivatorObject () |
| | Virtual destructor for polymorphic activator objects.
|
This is an object class that describes a transform, but the input data is a matrix.
In some cases, when using third-party modules, converting a transform back to its position or rotation can have performance limitations. Therefore, it's better to use the matrix directly. For example, from the Bullet3 physics engine. And GameObjects with an attached Physics::CRigidbody component will have their transform converted to a matrix.
Although CTransformMatrix inherits from CTransformEuler, but some of the inherits member functions will not work like setPosition, setRotation, setScale...
You can call the setupMatrixTransform function from CGameObject to convert the transform from Euler to a Matrix.
Example code:
gameObject->setupMatrixTransform();
CTransformMatrix* transform = gameObject->getTransformMatrix();
core::matrix4 mat;
mat.setTranslation(core::vector3df(-1.0f, 1.0f, 0.0f));
transform->setRelativeTransform(mat);
This object class stores information for a GameObject.
Definition CGameObject.h:52