Blender V4.5
btCollisionWorldImporter Class Reference

#include <btCollisionWorldImporter.h>

Public Member Functions

 btCollisionWorldImporter (btCollisionWorld *world)
virtual ~btCollisionWorldImporter ()
bool convertAllObjects (btBulletSerializedArrays *arrays)
virtual void deleteAllData ()
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.

References m_collisionWorld, and m_verboseMode.

◆ ~btCollisionWorldImporter()

btCollisionWorldImporter::~btCollisionWorldImporter ( )
virtual

Definition at line 30 of file btCollisionWorldImporter.cpp.

Member Function Documentation

◆ convertAllObjects()

◆ convertCollisionShape()

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

Definition at line 242 of file btCollisionWorldImporter.cpp.

References BOX_SHAPE_PROXYTYPE, btBoxShape(), btBvhTriangleMeshShape(), btCapsuleShape(), btCollisionShape, btCompoundShape(), btConvexHullShape(), btOptimizedBvh(), btTransform, btTriangleIndexVertexArray(), btVector3, CAPSULE_SHAPE_PROXYTYPE, COMPOUND_SHAPE_PROXYTYPE, CONE_SHAPE_PROXYTYPE, CONST_GIMPACT_TRIMESH_SHAPE, convertCollisionShape(), CONVEX_HULL_SHAPE_PROXYTYPE, createBoxShape(), createBvhTriangleMeshShape(), createCapsuleShapeX(), createCapsuleShapeY(), createCapsuleShapeZ(), createCompoundShape(), createConeShapeX(), createConeShapeY(), createConeShapeZ(), createConvexHullShape(), createCylinderShapeX(), createCylinderShapeY(), createCylinderShapeZ(), createMeshInterface(), createMultiSphereShape(), createOptimizedBvh(), createPlaneShape(), createScaledTrangleMeshShape(), createSphereShape(), createStridingMeshInterfaceData(), createTriangleInfoMap(), CYLINDER_SHAPE_PROXYTYPE, btTriangleInfoMap::deSerialize(), btHashMap< Key, Value >::find(), gContactAddedCallback, GIMPACT_SHAPE_PROXYTYPE, i, m_bvhMap, btCompoundShapeChildData::m_childShape, btCompoundShapeData::m_childShapePtr, btConvexInternalShapeData::m_collisionMargin, btGImpactMeshShapeData::m_collisionMargin, btTriangleMeshShapeData::m_collisionMargin, btGImpactMeshShapeData::m_gimpactSubType, btConvexInternalShapeData::m_implicitShapeDimensions, btMultiSphereShapeData::m_localPositionArrayPtr, btMultiSphereShapeData::m_localPositionArraySize, btConvexInternalShapeData::m_localScaling, btGImpactMeshShapeData::m_localScaling, btScaledTriangleMeshShapeData::m_localScaling, btStaticPlaneShapeData::m_localScaling, btGImpactMeshShapeData::m_meshInterface, btTriangleMeshShapeData::m_meshInterface, btCompoundShapeData::m_numChildShapes, btConvexHullShapeData::m_numUnscaledPoints, btStaticPlaneShapeData::m_planeConstant, btStaticPlaneShapeData::m_planeNormal, btPositionAndRadius::m_pos, btTriangleMeshShapeData::m_quantizedDoubleBvh, btTriangleMeshShapeData::m_quantizedFloatBvh, btPositionAndRadius::m_radius, btStridingMeshInterfaceData::m_scaling, btCollisionShapeData::m_shapeType, btCompoundShapeChildData::m_transform, btTriangleMeshShapeData::m_triangleInfoMap, btScaledTriangleMeshShapeData::m_trimeshShapeData, btConvexHullShapeData::m_unscaledPointsDoublePtr, btConvexHullShapeData::m_unscaledPointsFloatPtr, btCapsuleShapeData::m_upAxis, btCylinderShapeData::m_upAxis, btConeShapeData::m_upIndex, MULTI_SPHERE_SHAPE_PROXYTYPE, printf, btAlignedObjectArray< T >::resize(), SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE, btGImpactMeshShape::setLocalScaling(), btGImpactMeshShape::setMargin(), SOFTBODY_SHAPE_PROXYTYPE, SPHERE_SHAPE_PROXYTYPE, STATIC_PLANE_PROXYTYPE, TRIANGLE_MESH_SHAPE_PROXYTYPE, and btGImpactShapeInterface::updateBound().

Referenced by convertAllObjects(), and convertCollisionShape().

◆ createBoxShape()

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

◆ createBvhTriangleMeshShape()

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

◆ createCapsuleShapeX()

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

◆ createCapsuleShapeY()

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

◆ createCapsuleShapeZ()

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

◆ createCollisionObject()

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

◆ createCompoundShape()

btCompoundShape * btCollisionWorldImporter::createCompoundShape ( )
virtual

◆ createConeShapeX()

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

◆ createConeShapeY()

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

◆ createConeShapeZ()

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

◆ createConvexHullShape()

btConvexHullShape * btCollisionWorldImporter::createConvexHullShape ( )
virtual

◆ createConvexTriangleMeshShape()

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

Definition at line 990 of file btCollisionWorldImporter.cpp.

References btCollisionShape, and btStridingMeshInterface.

◆ createCylinderShapeX()

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

◆ createCylinderShapeY()

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

◆ createCylinderShapeZ()

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

◆ createMeshInterface()

◆ createMultiSphereShape()

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

◆ createOptimizedBvh()

btOptimizedBvh * btCollisionWorldImporter::createOptimizedBvh ( )
virtual

acceleration and connectivity structures

Definition at line 962 of file btCollisionWorldImporter.cpp.

References btOptimizedBvh(), m_allocatedBvhs, and btAlignedObjectArray< T >::push_back().

Referenced by convertAllObjects(), and convertCollisionShape().

◆ createPlaneShape()

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

◆ createScaledTrangleMeshShape()

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

◆ createSphereShape()

btCollisionShape * btCollisionWorldImporter::createSphereShape ( btScalar radius)
virtual

◆ createStridingMeshInterfaceData()

btStridingMeshInterfaceData * btCollisionWorldImporter::createStridingMeshInterfaceData ( btStridingMeshInterfaceData * interfaceData)
virtual

◆ createTriangleInfoMap()

btTriangleInfoMap * btCollisionWorldImporter::createTriangleInfoMap ( )
virtual

◆ createTriangleMeshContainer()

btTriangleIndexVertexArray * btCollisionWorldImporter::createTriangleMeshContainer ( )
virtual

◆ deleteAllData()

◆ duplicateName()

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

◆ getBvhByIndex()

btOptimizedBvh * btCollisionWorldImporter::getBvhByIndex ( int index) const

Definition at line 1074 of file btCollisionWorldImporter.cpp.

References btOptimizedBvh(), and m_allocatedBvhs.

◆ getCollisionObjectByName()

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

◆ getCollisionShapeByIndex()

btCollisionShape * btCollisionWorldImporter::getCollisionShapeByIndex ( int index)

Definition at line 1037 of file btCollisionWorldImporter.cpp.

References btCollisionShape, and m_allocatedCollisionShapes.

◆ getCollisionShapeByName()

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

◆ getNameForPointer()

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

◆ getNumBvhs()

int btCollisionWorldImporter::getNumBvhs ( ) const

◆ getNumCollisionShapes()

int btCollisionWorldImporter::getNumCollisionShapes ( ) const

◆ getNumRigidBodies()

int btCollisionWorldImporter::getNumRigidBodies ( ) const

◆ getNumTriangleInfoMaps()

int btCollisionWorldImporter::getNumTriangleInfoMaps ( ) const

◆ getRigidBodyByIndex()

btCollisionObject * btCollisionWorldImporter::getRigidBodyByIndex ( int index) const

Definition at line 1065 of file btCollisionWorldImporter.cpp.

References btCollisionObject, and m_allocatedRigidBodies.

◆ getTriangleInfoMapByIndex()

btTriangleInfoMap * btCollisionWorldImporter::getTriangleInfoMapByIndex ( int index) const

Definition at line 1084 of file btCollisionWorldImporter.cpp.

References m_allocatedTriangleInfoMaps.

◆ getVerboseMode()

int btCollisionWorldImporter::getVerboseMode ( ) const
inline

Definition at line 105 of file btCollisionWorldImporter.h.

References m_verboseMode.

◆ setVerboseMode()

void btCollisionWorldImporter::setVerboseMode ( int verboseMode)
inline

Definition at line 100 of file btCollisionWorldImporter.h.

References m_verboseMode.

Member Data Documentation

◆ m_allocatedbtStridingMeshInterfaceDatas

btAlignedObjectArray<btStridingMeshInterfaceData*> btCollisionWorldImporter::m_allocatedbtStridingMeshInterfaceDatas
protected

Definition at line 60 of file btCollisionWorldImporter.h.

Referenced by createStridingMeshInterfaceData(), and deleteAllData().

◆ m_allocatedBvhs

btAlignedObjectArray<btOptimizedBvh*> btCollisionWorldImporter::m_allocatedBvhs
protected

◆ m_allocatedCollisionObjects

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedCollisionObjects
protected

Definition at line 61 of file btCollisionWorldImporter.h.

Referenced by createCollisionObject(), and deleteAllData().

◆ m_allocatedCollisionShapes

◆ m_allocatedNames

btAlignedObjectArray<char*> btCollisionWorldImporter::m_allocatedNames
protected

Definition at line 63 of file btCollisionWorldImporter.h.

Referenced by deleteAllData(), and duplicateName().

◆ m_allocatedRigidBodies

btAlignedObjectArray<btCollisionObject*> btCollisionWorldImporter::m_allocatedRigidBodies
protected

Definition at line 55 of file btCollisionWorldImporter.h.

Referenced by getNumRigidBodies(), and getRigidBodyByIndex().

◆ m_allocatedTriangleIndexArrays

btAlignedObjectArray<btTriangleIndexVertexArray*> btCollisionWorldImporter::m_allocatedTriangleIndexArrays
protected

Definition at line 59 of file btCollisionWorldImporter.h.

Referenced by createTriangleMeshContainer(), and deleteAllData().

◆ m_allocatedTriangleInfoMaps

btAlignedObjectArray<btTriangleInfoMap*> btCollisionWorldImporter::m_allocatedTriangleInfoMaps
protected

◆ m_bodyMap

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

Definition at line 81 of file btCollisionWorldImporter.h.

Referenced by convertAllObjects().

◆ m_bvhMap

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

Definition at line 72 of file btCollisionWorldImporter.h.

Referenced by convertAllObjects(), and convertCollisionShape().

◆ m_charIndexArrays

btAlignedObjectArray<unsigned char*> btCollisionWorldImporter::m_charIndexArrays
protected

Definition at line 67 of file btCollisionWorldImporter.h.

Referenced by createMeshInterface(), and deleteAllData().

◆ m_collisionWorld

btCollisionWorld* btCollisionWorldImporter::m_collisionWorld
protected

◆ m_doubleVertexArrays

btAlignedObjectArray<btVector3DoubleData*> btCollisionWorldImporter::m_doubleVertexArrays
protected

Definition at line 70 of file btCollisionWorldImporter.h.

Referenced by createMeshInterface(), and deleteAllData().

◆ m_floatVertexArrays

btAlignedObjectArray<btVector3FloatData*> btCollisionWorldImporter::m_floatVertexArrays
protected

Definition at line 69 of file btCollisionWorldImporter.h.

Referenced by createMeshInterface(), and deleteAllData().

◆ m_indexArrays

btAlignedObjectArray<int*> btCollisionWorldImporter::m_indexArrays
protected

Definition at line 65 of file btCollisionWorldImporter.h.

Referenced by createMeshInterface(), and deleteAllData().

◆ m_nameColObjMap

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

Definition at line 76 of file btCollisionWorldImporter.h.

Referenced by createCollisionObject(), and getCollisionObjectByName().

◆ m_nameShapeMap

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

Definition at line 75 of file btCollisionWorldImporter.h.

Referenced by convertAllObjects(), and getCollisionShapeByName().

◆ m_objectNameMap

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

◆ m_shapeMap

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

Definition at line 80 of file btCollisionWorldImporter.h.

Referenced by convertAllObjects().

◆ m_shortIndexArrays

btAlignedObjectArray<short int*> btCollisionWorldImporter::m_shortIndexArrays
protected

Definition at line 66 of file btCollisionWorldImporter.h.

Referenced by createMeshInterface(), and deleteAllData().

◆ m_timMap

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

Definition at line 73 of file btCollisionWorldImporter.h.

◆ m_verboseMode

int btCollisionWorldImporter::m_verboseMode
protected

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