OpenMW
|
#include <bulletnifloader.hpp>
Public Member Functions | |
ManualBulletShapeLoader () | |
virtual | ~ManualBulletShapeLoader () |
void | warn (const std::string &msg) |
void | fail (const std::string &msg) |
void | loadResource (Ogre::Resource *resource) |
void | load (const std::string &name, const std::string &group) |
Private Member Functions | |
btVector3 | getbtVector (Ogre::Vector3 const &v) |
void | handleNode (btTriangleMesh *mesh, Nif::Node const *node, int flags, bool isCollisionNode, bool raycasting, bool isMarker) |
bool | hasRootCollisionNode (const Nif::Node *node) |
void | handleNiTriShape (btTriangleMesh *mesh, const Nif::NiTriShape *shape, int flags, const Ogre::Matrix4 &transform, bool raycasting) |
Private Attributes | |
std::string | mResourceName |
OEngine::Physic::BulletShape * | mShape |
btBoxShape * | mBoundingBox |
bool | mHasShape |
Load bulletShape from NIF files.
void NifBullet::ManualBulletShapeLoader::fail | ( | const std::string & | msg | ) | [inline] |
btVector3 NifBullet::ManualBulletShapeLoader::getbtVector | ( | Ogre::Vector3 const & | v | ) | [private] |
void NifBullet::ManualBulletShapeLoader::handleNiTriShape | ( | btTriangleMesh * | mesh, |
const Nif::NiTriShape * | shape, | ||
int | flags, | ||
const Ogre::Matrix4 & | transform, | ||
bool | raycasting | ||
) | [private] |
convert a NiTriShape to a bullet trishape.
void NifBullet::ManualBulletShapeLoader::handleNode | ( | btTriangleMesh * | mesh, |
Nif::Node const * | node, | ||
int | flags, | ||
bool | isCollisionNode, | ||
bool | raycasting, | ||
bool | isMarker | ||
) | [private] |
Parse a node.
bool NifBullet::ManualBulletShapeLoader::hasRootCollisionNode | ( | const Nif::Node * | node | ) | [private] |
Helper function
void NifBullet::ManualBulletShapeLoader::load | ( | const std::string & | name, |
const std::string & | group | ||
) | [virtual] |
This function load a new bulletShape from a NIF file into the BulletShapeManager. When the file is loaded, you can then use BulletShapeManager::getByName() to retrive the bulletShape. Warning: this function will just crash if the resourceGroup doesn't exist!
Reimplemented from OEngine::Physic::BulletShapeLoader.
void NifBullet::ManualBulletShapeLoader::loadResource | ( | Ogre::Resource * | resource | ) | [virtual] |
This function should not be called manualy. Use load instead. (this is called by the BulletShapeManager when you use load).
Reimplemented from OEngine::Physic::BulletShapeLoader.
void NifBullet::ManualBulletShapeLoader::warn | ( | const std::string & | msg | ) | [inline] |
btBoxShape* NifBullet::ManualBulletShapeLoader::mBoundingBox [private] |
bool NifBullet::ManualBulletShapeLoader::mHasShape [private] |
std::string NifBullet::ManualBulletShapeLoader::mResourceName [private] |