Bullet Collision Detection & Physics Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btCollisionWorldImporter Class Reference

#include <btCollisionWorldImporter.h>

Collaboration diagram for btCollisionWorldImporter:
Collaboration graph
[legend]

Public Member Functions

 btCollisionWorldImporter (btCollisionWorld *world)
 
virtual ~btCollisionWorldImporter ()
 
bool convertAllObjects (btBulletSerializedArrays *arrays)
 
virtual void deleteAllData ()
 delete all memory collision shapes, rigid bodies, constraints etc. More...
 
void setVerboseMode (int verboseMode)
 
int getVerboseMode () const
 
int getNumCollisionShapes () const
 
btCollisionShapegetCollisionShapeByIndex (int index)
 
int getNumRigidBodies () const
 
btCollisionObjectgetRigidBodyByIndex (int index) const
 
int getNumConstraints () const
 
int getNumBvhs () const
 
btOptimizedBvhgetBvhByIndex (int index) const
 
int getNumTriangleInfoMaps () const
 
btTriangleInfoMapgetTriangleInfoMapByIndex (int index) const
 
btCollisionShapegetCollisionShapeByName (const char *name)
 
btCollisionObjectgetCollisionObjectByName (const char *name)
 
const char * getNameForPointer (const void *ptr) const
 
virtual btCollisionObjectcreateCollisionObject (const btTransform &startTransform, btCollisionShape *shape, const char *bodyName)
 those virtuals are called by load and can be overridden by the user More...
 
virtual btCollisionShapecreatePlaneShape (const btVector3 &planeNormal, btScalar planeConstant)
 shapes More...
 
virtual btCollisionShapecreateBoxShape (const btVector3 &halfExtents)
 
virtual btCollisionShapecreateSphereShape (btScalar radius)
 
virtual btCollisionShapecreateCapsuleShapeX (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateCapsuleShapeY (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateCapsuleShapeZ (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateCylinderShapeX (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateCylinderShapeY (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateCylinderShapeZ (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateConeShapeX (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateConeShapeY (btScalar radius, btScalar height)
 
virtual btCollisionShapecreateConeShapeZ (btScalar radius, btScalar height)
 
virtual class btTriangleIndexVertexArraycreateTriangleMeshContainer ()
 
virtual btBvhTriangleMeshShapecreateBvhTriangleMeshShape (btStridingMeshInterface *trimesh, btOptimizedBvh *bvh)
 
virtual btCollisionShapecreateConvexTriangleMeshShape (btStridingMeshInterface *trimesh)
 
virtual btStridingMeshInterfaceDatacreateStridingMeshInterfaceData (btStridingMeshInterfaceData *interfaceData)
 
virtual class btConvexHullShapecreateConvexHullShape ()
 
virtual class btCompoundShapecreateCompoundShape ()
 
virtual class btScaledBvhTriangleMeshShapecreateScaledTrangleMeshShape (btBvhTriangleMeshShape *meshShape, const btVector3 &localScalingbtBvhTriangleMeshShape)
 
virtual class btMultiSphereShapecreateMultiSphereShape (const btVector3 *positions, const btScalar *radi, int numSpheres)
 
virtual btTriangleIndexVertexArraycreateMeshInterface (btStridingMeshInterfaceData &meshData)
 
virtual btOptimizedBvhcreateOptimizedBvh ()
 acceleration and connectivity structures More...
 
virtual btTriangleInfoMapcreateTriangleInfoMap ()
 

Protected Member Functions

char * duplicateName (const char *name)
 
btCollisionShapeconvertCollisionShape (btCollisionShapeData *shapeData)
 

Protected Attributes

btCollisionWorldm_collisionWorld
 
int m_verboseMode
 
btAlignedObjectArray< btCollisionShape * > m_allocatedCollisionShapes
 
btAlignedObjectArray< btCollisionObject * > m_allocatedRigidBodies
 
btAlignedObjectArray< btOptimizedBvh * > m_allocatedBvhs
 
btAlignedObjectArray< btTriangleInfoMap * > m_allocatedTriangleInfoMaps
 
btAlignedObjectArray< btTriangleIndexVertexArray * > m_allocatedTriangleIndexArrays
 
btAlignedObjectArray< btStridingMeshInterfaceData * > m_allocatedbtStridingMeshInterfaceDatas
 
btAlignedObjectArray< btCollisionObject * > m_allocatedCollisionObjects
 
btAlignedObjectArray< char * > m_allocatedNames
 
btAlignedObjectArray< int * > m_indexArrays
 
btAlignedObjectArray< short int * > m_shortIndexArrays
 
btAlignedObjectArray< unsigned char * > m_charIndexArrays
 
btAlignedObjectArray< btVector3FloatData * > m_floatVertexArrays
 
btAlignedObjectArray< btVector3DoubleData * > m_doubleVertexArrays
 
btHashMap< btHashPtr, btOptimizedBvh * > m_bvhMap
 
btHashMap< btHashPtr, btTriangleInfoMap * > m_timMap
 
btHashMap< btHashString, btCollisionShape * > m_nameShapeMap
 
btHashMap< btHashString, btCollisionObject * > m_nameColObjMap
 
btHashMap< btHashPtr, const char * > m_objectNameMap
 
btHashMap< btHashPtr, btCollisionShape * > m_shapeMap
 
btHashMap< btHashPtr, btCollisionObject * > m_bodyMap
 

Detailed Description

Definition at line 52 of file btCollisionWorldImporter.h.

Constructor & Destructor Documentation

btCollisionWorldImporter::btCollisionWorldImporter ( btCollisionWorld world)

Definition at line 24 of file btCollisionWorldImporter.cpp.

btCollisionWorldImporter::~btCollisionWorldImporter ( )
virtual

Definition at line 31 of file btCollisionWorldImporter.cpp.

Member Function Documentation

bool btCollisionWorldImporter::convertAllObjects ( btBulletSerializedArrays arrays)

Definition at line 39 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::convertCollisionShape ( btCollisionShapeData shapeData)
protected

Definition at line 260 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createBoxShape ( const btVector3 halfExtents)
virtual

Definition at line 927 of file btCollisionWorldImporter.cpp.

btBvhTriangleMeshShape * btCollisionWorldImporter::createBvhTriangleMeshShape ( btStridingMeshInterface trimesh,
btOptimizedBvh bvh 
)
virtual

Definition at line 1026 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCapsuleShapeX ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 941 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCapsuleShapeY ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 948 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCapsuleShapeZ ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 955 of file btCollisionWorldImporter.cpp.

btCollisionObject * btCollisionWorldImporter::createCollisionObject ( const btTransform startTransform,
btCollisionShape shape,
const char *  bodyName 
)
virtual

those virtuals are called by load and can be overridden by the user

Definition at line 901 of file btCollisionWorldImporter.cpp.

btCompoundShape * btCollisionWorldImporter::createCompoundShape ( )
virtual

Definition at line 1062 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createConeShapeX ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 983 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createConeShapeY ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 990 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createConeShapeZ ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 997 of file btCollisionWorldImporter.cpp.

btConvexHullShape * btCollisionWorldImporter::createConvexHullShape ( )
virtual

Definition at line 1055 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createConvexTriangleMeshShape ( btStridingMeshInterface trimesh)
virtual

Definition at line 1041 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCylinderShapeX ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 962 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCylinderShapeY ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 969 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createCylinderShapeZ ( btScalar  radius,
btScalar  height 
)
virtual

Definition at line 976 of file btCollisionWorldImporter.cpp.

btTriangleIndexVertexArray * btCollisionWorldImporter::createMeshInterface ( btStridingMeshInterfaceData meshData)
virtual

Definition at line 652 of file btCollisionWorldImporter.cpp.

btMultiSphereShape * btCollisionWorldImporter::createMultiSphereShape ( const btVector3 positions,
const btScalar radi,
int  numSpheres 
)
virtual

Definition at line 1077 of file btCollisionWorldImporter.cpp.

btOptimizedBvh * btCollisionWorldImporter::createOptimizedBvh ( )
virtual

acceleration and connectivity structures

Definition at line 1011 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createPlaneShape ( const btVector3 planeNormal,
btScalar  planeConstant 
)
virtual

shapes

Definition at line 921 of file btCollisionWorldImporter.cpp.

btScaledBvhTriangleMeshShape * btCollisionWorldImporter::createScaledTrangleMeshShape ( btBvhTriangleMeshShape meshShape,
const btVector3 localScalingbtBvhTriangleMeshShape 
)
virtual

Definition at line 1070 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::createSphereShape ( btScalar  radius)
virtual

Definition at line 933 of file btCollisionWorldImporter.cpp.

btStridingMeshInterfaceData * btCollisionWorldImporter::createStridingMeshInterfaceData ( btStridingMeshInterfaceData interfaceData)
virtual

the m_3indices8 was not initialized in some Bullet versions, this can cause crashes at loading time we catch it by only dealing with m_3indices8 if none of the other indices are initialized

Definition at line 770 of file btCollisionWorldImporter.cpp.

btTriangleInfoMap * btCollisionWorldImporter::createTriangleInfoMap ( )
virtual

Definition at line 1019 of file btCollisionWorldImporter.cpp.

btTriangleIndexVertexArray * btCollisionWorldImporter::createTriangleMeshContainer ( )
virtual

Definition at line 1004 of file btCollisionWorldImporter.cpp.

void btCollisionWorldImporter::deleteAllData ( )
virtual

delete all memory collision shapes, rigid bodies, constraints etc.

allocated during the load. make sure you don't use the dynamics world containing objects after you call this method

Definition at line 151 of file btCollisionWorldImporter.cpp.

char * btCollisionWorldImporter::duplicateName ( const char *  name)
protected

Definition at line 628 of file btCollisionWorldImporter.cpp.

btOptimizedBvh * btCollisionWorldImporter::getBvhByIndex ( int  index) const

Definition at line 1132 of file btCollisionWorldImporter.cpp.

btCollisionObject * btCollisionWorldImporter::getCollisionObjectByName ( const char *  name)

Definition at line 891 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::getCollisionShapeByIndex ( int  index)

Definition at line 1092 of file btCollisionWorldImporter.cpp.

btCollisionShape * btCollisionWorldImporter::getCollisionShapeByName ( const char *  name)

Definition at line 1097 of file btCollisionWorldImporter.cpp.

const char * btCollisionWorldImporter::getNameForPointer ( const void *  ptr) const

Definition at line 1108 of file btCollisionWorldImporter.cpp.

int btCollisionWorldImporter::getNumBvhs ( ) const

Definition at line 1128 of file btCollisionWorldImporter.cpp.

int btCollisionWorldImporter::getNumCollisionShapes ( ) const

Definition at line 1087 of file btCollisionWorldImporter.cpp.

int btCollisionWorldImporter::getNumConstraints ( ) const
int btCollisionWorldImporter::getNumRigidBodies ( ) const

Definition at line 1117 of file btCollisionWorldImporter.cpp.

int btCollisionWorldImporter::getNumTriangleInfoMaps ( ) const

Definition at line 1137 of file btCollisionWorldImporter.cpp.

btCollisionObject * btCollisionWorldImporter::getRigidBodyByIndex ( int  index) const

Definition at line 1122 of file btCollisionWorldImporter.cpp.

btTriangleInfoMap * btCollisionWorldImporter::getTriangleInfoMapByIndex ( int  index) const

Definition at line 1142 of file btCollisionWorldImporter.cpp.

int btCollisionWorldImporter::getVerboseMode ( ) const
inline

Definition at line 117 of file btCollisionWorldImporter.h.

void btCollisionWorldImporter::setVerboseMode ( int  verboseMode)
inline

Definition at line 112 of file btCollisionWorldImporter.h.

Member Data Documentation

btAlignedObjectArray<btStridingMeshInterfaceData*> btCollisionWorldImporter::m_allocatedbtStridingMeshInterfaceDatas
protected

Definition at line 65 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btOptimizedBvh*> btCollisionWorldImporter::m_allocatedBvhs
protected

Definition at line 62 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedCollisionObjects
protected

Definition at line 66 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btCollisionShape*> btCollisionWorldImporter::m_allocatedCollisionShapes
protected

Definition at line 59 of file btCollisionWorldImporter.h.

btAlignedObjectArray<char*> btCollisionWorldImporter::m_allocatedNames
protected

Definition at line 69 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedRigidBodies
protected

Definition at line 60 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btTriangleIndexVertexArray*> btCollisionWorldImporter::m_allocatedTriangleIndexArrays
protected

Definition at line 64 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btTriangleInfoMap*> btCollisionWorldImporter::m_allocatedTriangleInfoMaps
protected

Definition at line 63 of file btCollisionWorldImporter.h.

btHashMap<btHashPtr,btCollisionObject*> btCollisionWorldImporter::m_bodyMap
protected

Definition at line 88 of file btCollisionWorldImporter.h.

btHashMap<btHashPtr,btOptimizedBvh*> btCollisionWorldImporter::m_bvhMap
protected

Definition at line 79 of file btCollisionWorldImporter.h.

btAlignedObjectArray<unsigned char*> btCollisionWorldImporter::m_charIndexArrays
protected

Definition at line 73 of file btCollisionWorldImporter.h.

btCollisionWorld* btCollisionWorldImporter::m_collisionWorld
protected

Definition at line 55 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btVector3DoubleData*> btCollisionWorldImporter::m_doubleVertexArrays
protected

Definition at line 76 of file btCollisionWorldImporter.h.

btAlignedObjectArray<btVector3FloatData*> btCollisionWorldImporter::m_floatVertexArrays
protected

Definition at line 75 of file btCollisionWorldImporter.h.

btAlignedObjectArray<int*> btCollisionWorldImporter::m_indexArrays
protected

Definition at line 71 of file btCollisionWorldImporter.h.

btHashMap<btHashString,btCollisionObject*> btCollisionWorldImporter::m_nameColObjMap
protected

Definition at line 83 of file btCollisionWorldImporter.h.

btHashMap<btHashString,btCollisionShape*> btCollisionWorldImporter::m_nameShapeMap
protected

Definition at line 82 of file btCollisionWorldImporter.h.

btHashMap<btHashPtr,const char*> btCollisionWorldImporter::m_objectNameMap
protected

Definition at line 85 of file btCollisionWorldImporter.h.

btHashMap<btHashPtr,btCollisionShape*> btCollisionWorldImporter::m_shapeMap
protected

Definition at line 87 of file btCollisionWorldImporter.h.

btAlignedObjectArray<short int*> btCollisionWorldImporter::m_shortIndexArrays
protected

Definition at line 72 of file btCollisionWorldImporter.h.

btHashMap<btHashPtr,btTriangleInfoMap*> btCollisionWorldImporter::m_timMap
protected

Definition at line 80 of file btCollisionWorldImporter.h.

int btCollisionWorldImporter::m_verboseMode
protected

Definition at line 57 of file btCollisionWorldImporter.h.


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