OpenMW
Public Member Functions | Private Member Functions | Private Attributes
NifBullet::ManualBulletShapeLoader Class Reference

#include <bulletnifloader.hpp>

List of all members.

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::BulletShapemShape
btBoxShape * mBoundingBox
bool mHasShape

Detailed Description

Load bulletShape from NIF files.


Constructor & Destructor Documentation


Member Function Documentation

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.

Todo:
don't do this in the editor

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]

Member Data Documentation


The documentation for this class was generated from the following files: