|
OpenMW
|
#include <physic.hpp>
Public Member Functions | |
| PhysicActor (const std::string &name, const std::string &mesh, PhysicEngine *engine, const Ogre::Vector3 &position, const Ogre::Quaternion &rotation, float scale) | |
| ~PhysicActor () | |
| void | setPosition (const Ogre::Vector3 &pos) |
| void | setRotation (const Ogre::Quaternion &quat) |
| void | enableCollisions (bool collision) |
| bool | getCollisionMode () const |
| Ogre::Vector3 | getPosition () |
| Ogre::Quaternion | getRotation () |
| void | setScale (float scale) |
| Ogre::Vector3 | getHalfExtents () const |
| void | setInertialForce (const Ogre::Vector3 &force) |
| const Ogre::Vector3 & | getInertialForce () const |
| void | setOnGround (bool grounded) |
| bool | getOnGround () const |
| btCollisionObject * | getCollisionBody () const |
Private Member Functions | |
| void | disableCollisionBody () |
| void | enableCollisionBody () |
Private Attributes | |
| OEngine::Physic::RigidBody * | mBody |
| OEngine::Physic::RigidBody * | mRaycastingBody |
| Ogre::Vector3 | mBoxScaledTranslation |
| Ogre::Quaternion | mBoxRotation |
| btQuaternion | mBoxRotationInverse |
| Ogre::Vector3 | mForce |
| bool | mOnGround |
| bool | mCollisionMode |
| std::string | mMesh |
| std::string | mName |
| PhysicEngine * | mEngine |
A physic actor uses a rigid body based on box shapes. Pmove is used to move the physic actor around the dynamic world.
| OEngine::Physic::PhysicActor::PhysicActor | ( | const std::string & | name, |
| const std::string & | mesh, | ||
| PhysicEngine * | engine, | ||
| const Ogre::Vector3 & | position, | ||
| const Ogre::Quaternion & | rotation, | ||
| float | scale | ||
| ) |
| void OEngine::Physic::PhysicActor::disableCollisionBody | ( | ) | [private] |
| void OEngine::Physic::PhysicActor::enableCollisionBody | ( | ) | [private] |
| void OEngine::Physic::PhysicActor::enableCollisions | ( | bool | collision | ) |
| btCollisionObject* OEngine::Physic::PhysicActor::getCollisionBody | ( | ) | const [inline] |
| bool OEngine::Physic::PhysicActor::getCollisionMode | ( | ) | const [inline] |
| Ogre::Vector3 OEngine::Physic::PhysicActor::getHalfExtents | ( | ) | const |
Returns the half extents for this PhysiActor
| const Ogre::Vector3& OEngine::Physic::PhysicActor::getInertialForce | ( | ) | const [inline] |
Gets the current amount of inertial force (incl. gravity) affecting this physic actor
| bool OEngine::Physic::PhysicActor::getOnGround | ( | ) | const [inline] |
| Ogre::Vector3 OEngine::Physic::PhysicActor::getPosition | ( | ) |
This returns the visual position of the PhysicActor (used to position a scenenode). Note - this is different from the position of the contained mBody.
| Ogre::Quaternion OEngine::Physic::PhysicActor::getRotation | ( | ) |
Returns the visual orientation of the PhysicActor
| void OEngine::Physic::PhysicActor::setInertialForce | ( | const Ogre::Vector3 & | force | ) |
Sets the current amount of inertial force (incl. gravity) affecting this physic actor
| void OEngine::Physic::PhysicActor::setOnGround | ( | bool | grounded | ) |
| void OEngine::Physic::PhysicActor::setPosition | ( | const Ogre::Vector3 & | pos | ) |
| void OEngine::Physic::PhysicActor::setRotation | ( | const Ogre::Quaternion & | quat | ) |
This adjusts the rotation of a PhysicActor If we have any problems with this (getting stuck in pmove) we should change it from setting the visual orientation to setting the orientation of the rigid body directly.
| void OEngine::Physic::PhysicActor::setScale | ( | float | scale | ) |
Sets the scale of the PhysicActor
Ogre::Quaternion OEngine::Physic::PhysicActor::mBoxRotation [private] |
btQuaternion OEngine::Physic::PhysicActor::mBoxRotationInverse [private] |
Ogre::Vector3 OEngine::Physic::PhysicActor::mBoxScaledTranslation [private] |
bool OEngine::Physic::PhysicActor::mCollisionMode [private] |
Ogre::Vector3 OEngine::Physic::PhysicActor::mForce [private] |
std::string OEngine::Physic::PhysicActor::mMesh [private] |
std::string OEngine::Physic::PhysicActor::mName [private] |
bool OEngine::Physic::PhysicActor::mOnGround [private] |
1.7.6.1