MotionStateManager handles physics motion of objects.
More...
#include <motionstatemanager.h>
MotionStateManager handles physics motion of objects.
◆ MotionStateManager()
MotionStateManager::MotionStateManager |
( |
btTransform & |
pos, |
|
|
scene::ISceneNode * |
node |
|
) |
| |
Set the private attributes.
- Parameters
-
pos | btTransform (translation and rotation) |
node | ISceneNode graphic object |
btTransform initialPosition
Initial state.
Definition: motionstatemanager.h:14
scene::ISceneNode * node
Graphic node to transform.
Definition: motionstatemanager.h:12
◆ ~MotionStateManager()
virtual MotionStateManager::~MotionStateManager |
( |
| ) |
|
|
inlinevirtual |
◆ getWorldTransform()
void MotionStateManager::getWorldTransform |
( |
btTransform & |
wordTrans | ) |
const |
|
virtual |
Virtual method called by Bullet before setWorldTransform.
btTransform initialPosition
Initial state.
Definition: motionstatemanager.h:14
◆ setWorldTransform()
void MotionStateManager::setWorldTransform |
( |
const btTransform & |
worldTrans | ) |
|
|
virtual |
Virtual method called by Bullet whenever there is a physics change to an object.
This is the right place to update graphic objects.
11 if(this->
node ==
nullptr)
return;
12 btQuaternion rotation = worldTrans.getRotation();
13 btVector3 position = worldTrans.getOrigin();
15 this->
node->updateAbsolutePosition();
btTransform initialPosition
Initial state.
Definition: motionstatemanager.h:14
core::vector3df toIrrlichtVector(btVector3 vec)
Inverse of toBulletVector()
Definition: bullethelper.cpp:15
scene::ISceneNode * node
Graphic node to transform.
Definition: motionstatemanager.h:12
core::vector3df QuaternionToEuler(const btQuaternion &TQuat)
Inverse of EulerToQuaternion()
Definition: bullethelper.cpp:26
◆ initialPosition
btTransform MotionStateManager::initialPosition |
|
private |
◆ node
scene::ISceneNode* MotionStateManager::node |
|
private |
Graphic node to transform.
The documentation for this class was generated from the following files: