Bullet Collision Detection & Physics Library: btCollisionWorldImporter Class Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btCollisionWorldImporter Class Reference

`#include <btCollisionWorldImporter.h>`

Collaboration diagram for btCollisionWorldImporter:
[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.
void | setVerboseMode (int verboseMode)
int | getVerboseMode () const
int | getNumCollisionShapes () const
btCollisionShape * | getCollisionShapeByIndex (int index)
int | getNumRigidBodies () const
btCollisionObject * | getRigidBodyByIndex (int index) const
int | getNumBvhs () const
btOptimizedBvh * | getBvhByIndex (int index) const
int | getNumTriangleInfoMaps () const
btTriangleInfoMap * | getTriangleInfoMapByIndex (int index) const
btCollisionShape * | getCollisionShapeByName (const char *name)
btCollisionObject * | getCollisionObjectByName (const char *name)
const char * | getNameForPointer (const void *ptr) const
virtual btCollisionObject * | createCollisionObject (const btTransform &startTransform, btCollisionShape *shape, const char *bodyName)
| those virtuals are called by load and can be overridden by the user
virtual btCollisionShape * | createPlaneShape (const btVector3 &planeNormal, btScalar planeConstant)
| shapes
virtual btCollisionShape * | createBoxShape (const btVector3 &halfExtents)
virtual btCollisionShape * | createSphereShape (btScalar radius)
virtual btCollisionShape * | createCapsuleShapeX (btScalar radius, btScalar height)
virtual btCollisionShape * | createCapsuleShapeY (btScalar radius, btScalar height)
virtual btCollisionShape * | createCapsuleShapeZ (btScalar radius, btScalar height)
virtual btCollisionShape * | createCylinderShapeX (btScalar radius, btScalar height)
virtual btCollisionShape * | createCylinderShapeY (btScalar radius, btScalar height)
virtual btCollisionShape * | createCylinderShapeZ (btScalar radius, btScalar height)
virtual btCollisionShape * | createConeShapeX (btScalar radius, btScalar height)
virtual btCollisionShape * | createConeShapeY (btScalar radius, btScalar height)
virtual btCollisionShape * | createConeShapeZ (btScalar radius, btScalar height)
virtual class btTriangleIndexVertexArray * | createTriangleMeshContainer ()
virtual btBvhTriangleMeshShape * | createBvhTriangleMeshShape (btStridingMeshInterface *trimesh, btOptimizedBvh *bvh)
virtual btCollisionShape * | createConvexTriangleMeshShape (btStridingMeshInterface *trimesh)
virtual btStridingMeshInterfaceData * | createStridingMeshInterfaceData (btStridingMeshInterfaceData *interfaceData)
virtual class btConvexHullShape * | createConvexHullShape ()
virtual class btCompoundShape * | createCompoundShape ()
virtual class btScaledBvhTriangleMeshShape * | createScaledTrangleMeshShape (btBvhTriangleMeshShape *meshShape, const btVector3 &localScalingbtBvhTriangleMeshShape)
virtual class btMultiSphereShape * | createMultiSphereShape (const btVector3 *positions, const btScalar *radi, int numSpheres)
virtual btTriangleIndexVertexArray * | createMeshInterface (btStridingMeshInterfaceData &meshData)
virtual btOptimizedBvh * | createOptimizedBvh ()
| acceleration and connectivity structures
virtual btTriangleInfoMap * | createTriangleInfoMap ()

## Protected Member Functions
char * | duplicateName (const char *name)
btCollisionShape * | convertCollisionShape (btCollisionShapeData *shapeData)

## Protected Attributes
btCollisionWorld * | m_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 47 of file btCollisionWorldImporter.h.

## Constructor & Destructor Documentation

## ◆ btCollisionWorldImporter()

btCollisionWorldImporter::btCollisionWorldImporter | ( | btCollisionWorld * | world | ) |

Definition at line 24 of file btCollisionWorldImporter.cpp.

## ◆ ~btCollisionWorldImporter()

btCollisionWorldImporter::~btCollisionWorldImporter | ( |  | ) |
| virtual

Definition at line 30 of file btCollisionWorldImporter.cpp.

## Member Function Documentation

## ◆ convertAllObjects()

bool btCollisionWorldImporter::convertAllObjects | ( | btBulletSerializedArrays * | arrays | ) |

Definition at line 34 of file btCollisionWorldImporter.cpp.

## ◆ convertCollisionShape()

btCollisionShape * btCollisionWorldImporter::convertCollisionShape | ( | btCollisionShapeData * | shapeData | ) |
| protected

Definition at line 242 of file btCollisionWorldImporter.cpp.

## ◆ createBoxShape()

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

Definition at line 879 of file btCollisionWorldImporter.cpp.

## ◆ createBvhTriangleMeshShape()

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

Definition at line 976 of file btCollisionWorldImporter.cpp.

## ◆ createCapsuleShapeX()

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

Definition at line 892 of file btCollisionWorldImporter.cpp.

## ◆ createCapsuleShapeY()

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

Definition at line 899 of file btCollisionWorldImporter.cpp.

## ◆ createCapsuleShapeZ()

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

Definition at line 906 of file btCollisionWorldImporter.cpp.

## ◆ createCollisionObject()

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 855 of file btCollisionWorldImporter.cpp.

## ◆ createCompoundShape()

btCompoundShape * btCollisionWorldImporter::createCompoundShape | ( |  | ) |
| virtual

Definition at line 1010 of file btCollisionWorldImporter.cpp.

## ◆ createConeShapeX()

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

Definition at line 934 of file btCollisionWorldImporter.cpp.

## ◆ createConeShapeY()

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

Definition at line 941 of file btCollisionWorldImporter.cpp.

## ◆ createConeShapeZ()

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

Definition at line 948 of file btCollisionWorldImporter.cpp.

## ◆ createConvexHullShape()

btConvexHullShape * btCollisionWorldImporter::createConvexHullShape | ( |  | ) |
| virtual

Definition at line 1003 of file btCollisionWorldImporter.cpp.

## ◆ createConvexTriangleMeshShape()

btCollisionShape * btCollisionWorldImporter::createConvexTriangleMeshShape | ( | btStridingMeshInterface * | trimesh | ) |
| virtual

Definition at line 990 of file btCollisionWorldImporter.cpp.

## ◆ createCylinderShapeX()

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

Definition at line 913 of file btCollisionWorldImporter.cpp.

## ◆ createCylinderShapeY()

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

Definition at line 920 of file btCollisionWorldImporter.cpp.

## ◆ createCylinderShapeZ()

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

Definition at line 927 of file btCollisionWorldImporter.cpp.

## ◆ createMeshInterface()

btTriangleIndexVertexArray * btCollisionWorldImporter::createMeshInterface | ( | btStridingMeshInterfaceData & | meshData | ) |
| virtual

Definition at line 610 of file btCollisionWorldImporter.cpp.

## ◆ createMultiSphereShape()

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

Definition at line 1024 of file btCollisionWorldImporter.cpp.

## ◆ createOptimizedBvh()

btOptimizedBvh * btCollisionWorldImporter::createOptimizedBvh | ( |  | ) |
| virtual

acceleration and connectivity structures

Definition at line 962 of file btCollisionWorldImporter.cpp.

## ◆ createPlaneShape()

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

shapes

Definition at line 873 of file btCollisionWorldImporter.cpp.

## ◆ createScaledTrangleMeshShape()

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

Definition at line 1017 of file btCollisionWorldImporter.cpp.

## ◆ createSphereShape()

btCollisionShape * btCollisionWorldImporter::createSphereShape | ( | btScalar | radius | ) |
| virtual

Definition at line 885 of file btCollisionWorldImporter.cpp.

## ◆ createStridingMeshInterfaceData()

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 727 of file btCollisionWorldImporter.cpp.

## ◆ createTriangleInfoMap()

btTriangleInfoMap * btCollisionWorldImporter::createTriangleInfoMap | ( |  | ) |
| virtual

Definition at line 969 of file btCollisionWorldImporter.cpp.

## ◆ createTriangleMeshContainer()

btTriangleIndexVertexArray * btCollisionWorldImporter::createTriangleMeshContainer | ( |  | ) |
| virtual

Definition at line 955 of file btCollisionWorldImporter.cpp.

## ◆ deleteAllData()

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 140 of file btCollisionWorldImporter.cpp.

## ◆ duplicateName()

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

Definition at line 596 of file btCollisionWorldImporter.cpp.

## ◆ getBvhByIndex()

btOptimizedBvh * btCollisionWorldImporter::getBvhByIndex | ( | int | index | ) | const

Definition at line 1074 of file btCollisionWorldImporter.cpp.

## ◆ getCollisionObjectByName()

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

Definition at line 845 of file btCollisionWorldImporter.cpp.

## ◆ getCollisionShapeByIndex()

btCollisionShape * btCollisionWorldImporter::getCollisionShapeByIndex | ( | int | index | ) |

Definition at line 1037 of file btCollisionWorldImporter.cpp.

## ◆ getCollisionShapeByName()

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

Definition at line 1042 of file btCollisionWorldImporter.cpp.

## ◆ getNameForPointer()

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

Definition at line 1052 of file btCollisionWorldImporter.cpp.

## ◆ getNumBvhs()

int btCollisionWorldImporter::getNumBvhs | ( |  | ) | const

Definition at line 1070 of file btCollisionWorldImporter.cpp.

## ◆ getNumCollisionShapes()

int btCollisionWorldImporter::getNumCollisionShapes | ( |  | ) | const

Definition at line 1032 of file btCollisionWorldImporter.cpp.

## ◆ getNumRigidBodies()

int btCollisionWorldImporter::getNumRigidBodies | ( |  | ) | const

Definition at line 1060 of file btCollisionWorldImporter.cpp.

## ◆ getNumTriangleInfoMaps()

int btCollisionWorldImporter::getNumTriangleInfoMaps | ( |  | ) | const

Definition at line 1079 of file btCollisionWorldImporter.cpp.

## ◆ getRigidBodyByIndex()

btCollisionObject * btCollisionWorldImporter::getRigidBodyByIndex | ( | int | index | ) | const

Definition at line 1065 of file btCollisionWorldImporter.cpp.

## ◆ getTriangleInfoMapByIndex()

btTriangleInfoMap * btCollisionWorldImporter::getTriangleInfoMapByIndex | ( | int | index | ) | const

Definition at line 1084 of file btCollisionWorldImporter.cpp.

## ◆ getVerboseMode()

int btCollisionWorldImporter::getVerboseMode | ( |  | ) | const
| inline

Definition at line 105 of file btCollisionWorldImporter.h.

## ◆ setVerboseMode()

void btCollisionWorldImporter::setVerboseMode | ( | int | verboseMode | ) |
| inline

Definition at line 100 of file btCollisionWorldImporter.h.

## Member Data Documentation

## ◆ m_allocatedbtStridingMeshInterfaceDatas

btAlignedObjectArray<btStridingMeshInterfaceData*> btCollisionWorldImporter::m_allocatedbtStridingMeshInterfaceDatas
| protected

Definition at line 60 of file btCollisionWorldImporter.h.

## ◆ m_allocatedBvhs

btAlignedObjectArray<btOptimizedBvh*> btCollisionWorldImporter::m_allocatedBvhs
| protected

Definition at line 57 of file btCollisionWorldImporter.h.

## ◆ m_allocatedCollisionObjects

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedCollisionObjects
| protected

Definition at line 61 of file btCollisionWorldImporter.h.

## ◆ m_allocatedCollisionShapes

btAlignedObjectArray<btCollisionShape*> btCollisionWorldImporter::m_allocatedCollisionShapes
| protected

Definition at line 54 of file btCollisionWorldImporter.h.

## ◆ m_allocatedNames

btAlignedObjectArray<char*> btCollisionWorldImporter::m_allocatedNames
| protected

Definition at line 63 of file btCollisionWorldImporter.h.

## ◆ m_allocatedRigidBodies

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedRigidBodies
| protected

Definition at line 55 of file btCollisionWorldImporter.h.

## ◆ m_allocatedTriangleIndexArrays

btAlignedObjectArray<btTriangleIndexVertexArray*> btCollisionWorldImporter::m_allocatedTriangleIndexArrays
| protected

Definition at line 59 of file btCollisionWorldImporter.h.

## ◆ m_allocatedTriangleInfoMaps

btAlignedObjectArray<btTriangleInfoMap*> btCollisionWorldImporter::m_allocatedTriangleInfoMaps
| protected

Definition at line 58 of file btCollisionWorldImporter.h.

## ◆ m_bodyMap

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

Definition at line 81 of file btCollisionWorldImporter.h.

## ◆ m_bvhMap

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

Definition at line 72 of file btCollisionWorldImporter.h.

## ◆ m_charIndexArrays

btAlignedObjectArray<unsigned char*> btCollisionWorldImporter::m_charIndexArrays
| protected

Definition at line 67 of file btCollisionWorldImporter.h.

## ◆ m_collisionWorld

btCollisionWorld* btCollisionWorldImporter::m_collisionWorld
| protected

Definition at line 50 of file btCollisionWorldImporter.h.

## ◆ m_doubleVertexArrays

btAlignedObjectArray<btVector3DoubleData*> btCollisionWorldImporter::m_doubleVertexArrays
| protected

Definition at line 70 of file btCollisionWorldImporter.h.

## ◆ m_floatVertexArrays

btAlignedObjectArray<btVector3FloatData*> btCollisionWorldImporter::m_floatVertexArrays
| protected

Definition at line 69 of file btCollisionWorldImporter.h.

## ◆ m_indexArrays

btAlignedObjectArray<int*> btCollisionWorldImporter::m_indexArrays
| protected

Definition at line 65 of file btCollisionWorldImporter.h.

## ◆ m_nameColObjMap

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

Definition at line 76 of file btCollisionWorldImporter.h.

## ◆ m_nameShapeMap

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

Definition at line 75 of file btCollisionWorldImporter.h.

## ◆ m_objectNameMap

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

Definition at line 78 of file btCollisionWorldImporter.h.

## ◆ m_shapeMap

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

Definition at line 80 of file btCollisionWorldImporter.h.

## ◆ m_shortIndexArrays

btAlignedObjectArray<short int*> btCollisionWorldImporter::m_shortIndexArrays
| protected

Definition at line 66 of file btCollisionWorldImporter.h.

## ◆ m_timMap

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

Definition at line 73 of file btCollisionWorldImporter.h.

## ◆ m_verboseMode

int btCollisionWorldImporter::m_verboseMode
| protected

Definition at line 52 of file btCollisionWorldImporter.h.

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

- btCollisionWorldImporter.h
- btCollisionWorldImporter.cpp