Blender
V3.3
|
#include <btCollisionWorldImporter.h>
Protected Member Functions | |
char * | duplicateName (const char *name) |
btCollisionShape * | convertCollisionShape (btCollisionShapeData *shapeData) |
Definition at line 47 of file btCollisionWorldImporter.h.
btCollisionWorldImporter::btCollisionWorldImporter | ( | btCollisionWorld * | world | ) |
Definition at line 24 of file btCollisionWorldImporter.cpp.
|
virtual |
Definition at line 30 of file btCollisionWorldImporter.cpp.
bool btCollisionWorldImporter::convertAllObjects | ( | btBulletSerializedArrays * | arrays | ) |
Definition at line 34 of file btCollisionWorldImporter.cpp.
References blender::arrays, btBvhTriangleMeshShape(), btCollisionObject, btCollisionShape, btOptimizedBvh(), btTransform, CF_CUSTOM_MATERIAL_CALLBACK, btHashMap< Key, Value >::clear(), convertCollisionShape(), createCollisionObject(), createOptimizedBvh(), duplicateName(), btHashMap< Key, Value >::find(), btHashMap< Key, Value >::insert(), m_bodyMap, m_bvhMap, btCollisionObjectDoubleData::m_collisionShape, btCollisionObjectFloatData::m_collisionShape, btVector3FloatData::m_floats, btVector3DoubleData::m_floats, btCollisionObjectDoubleData::m_friction, btCollisionObjectDoubleData::m_name, btCollisionObjectFloatData::m_name, btCollisionShapeData::m_name, m_nameShapeMap, m_objectNameMap, btTransformFloatData::m_origin, btTransformDoubleData::m_origin, btCollisionObjectDoubleData::m_restitution, m_shapeMap, btCollisionObjectDoubleData::m_worldTransform, btCollisionObjectFloatData::m_worldTransform, and TRIANGLE_MESH_SHAPE_PROXYTYPE.
|
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, 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, btHashMap< Key, Value >::find(), gContactAddedCallback, GIMPACT_SHAPE_PROXYTYPE, m_bvhMap, btCompoundShapeChildData::m_childShape, btCompoundShapeData::m_childShapePtr, btTriangleMeshShapeData::m_collisionMargin, btConvexInternalShapeData::m_collisionMargin, btGImpactMeshShapeData::m_collisionMargin, btGImpactMeshShapeData::m_gimpactSubType, btConvexInternalShapeData::m_implicitShapeDimensions, btMultiSphereShapeData::m_localPositionArrayPtr, btMultiSphereShapeData::m_localPositionArraySize, btConvexInternalShapeData::m_localScaling, btScaledTriangleMeshShapeData::m_localScaling, btStaticPlaneShapeData::m_localScaling, btGImpactMeshShapeData::m_localScaling, btTriangleMeshShapeData::m_meshInterface, btGImpactMeshShapeData::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, map, MULTI_SPHERE_SHAPE_PROXYTYPE, radii, 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().
|
virtual |
Definition at line 879 of file btCollisionWorldImporter.cpp.
References btBoxShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 976 of file btCollisionWorldImporter.cpp.
References btBvhTriangleMeshShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 892 of file btCollisionWorldImporter.cpp.
References height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 899 of file btCollisionWorldImporter.cpp.
References btCapsuleShape(), height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 906 of file btCollisionWorldImporter.cpp.
References height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
those virtuals are called by load and can be overridden by the user
Definition at line 855 of file btCollisionWorldImporter.cpp.
References btCollisionWorld::addCollisionObject(), btCollisionObject, duplicateName(), btHashMap< Key, Value >::insert(), m_allocatedCollisionObjects, m_collisionWorld, m_nameColObjMap, m_objectNameMap, and btAlignedObjectArray< T >::push_back().
Referenced by convertAllObjects().
|
virtual |
Definition at line 1010 of file btCollisionWorldImporter.cpp.
References btCompoundShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 934 of file btCollisionWorldImporter.cpp.
References height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 941 of file btCollisionWorldImporter.cpp.
References btConeShape(), height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 948 of file btCollisionWorldImporter.cpp.
References height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 1003 of file btCollisionWorldImporter.cpp.
References btConvexHullShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 990 of file btCollisionWorldImporter.cpp.
|
virtual |
Definition at line 913 of file btCollisionWorldImporter.cpp.
References btVector3, height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 920 of file btCollisionWorldImporter.cpp.
References btCylinderShape(), btVector3, height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 927 of file btCollisionWorldImporter.cpp.
References btVector3, height, m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 610 of file btCollisionWorldImporter.cpp.
References btAlignedAlloc, btIndexedMesh, btTriangleIndexVertexArray(), createTriangleMeshContainer(), btMeshPartData::m_3indices16, btMeshPartData::m_3indices8, m_charIndexArrays, m_doubleVertexArrays, btVector3FloatData::m_floats, btVector3DoubleData::m_floats, m_floatVertexArrays, m_indexArrays, btMeshPartData::m_indices16, btMeshPartData::m_indices32, btStridingMeshInterfaceData::m_meshPartsPtr, btStridingMeshInterfaceData::m_numMeshParts, btMeshPartData::m_numTriangles, btMeshPartData::m_numVertices, m_shortIndexArrays, btIntIndexData::m_value, btShortIntIndexData::m_value, btShortIntIndexTripletData::m_values, btCharIndexTripletData::m_values, btMeshPartData::m_vertices3d, btMeshPartData::m_vertices3f, PHY_DOUBLE, PHY_FLOAT, PHY_INTEGER, PHY_SHORT, PHY_UCHAR, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 1024 of file btCollisionWorldImporter.cpp.
References btMultiSphereShape(), m_allocatedCollisionShapes, positions, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
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().
|
virtual |
shapes
Definition at line 873 of file btCollisionWorldImporter.cpp.
References btStaticPlaneShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 1017 of file btCollisionWorldImporter.cpp.
References btScaledBvhTriangleMeshShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 885 of file btCollisionWorldImporter.cpp.
References btSphereShape(), m_allocatedCollisionShapes, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
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.
References btMeshPartData::m_3indices16, btMeshPartData::m_3indices8, m_allocatedbtStridingMeshInterfaceDatas, btMeshPartData::m_indices16, btMeshPartData::m_indices32, btStridingMeshInterfaceData::m_meshPartsPtr, btStridingMeshInterfaceData::m_numMeshParts, btMeshPartData::m_numTriangles, btMeshPartData::m_numVertices, btStridingMeshInterfaceData::m_scaling, btMeshPartData::m_vertices3d, btMeshPartData::m_vertices3f, NULL, numIndices(), and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 969 of file btCollisionWorldImporter.cpp.
References m_allocatedTriangleInfoMaps, and btAlignedObjectArray< T >::push_back().
Referenced by convertCollisionShape().
|
virtual |
Definition at line 955 of file btCollisionWorldImporter.cpp.
References btTriangleIndexVertexArray(), m_allocatedTriangleIndexArrays, and btAlignedObjectArray< T >::push_back().
Referenced by createMeshInterface().
|
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.
References Freestyle::a, btAlignedFree, btAlignedObjectArray< T >::clear(), btMeshPartData::m_3indices16, btMeshPartData::m_3indices8, m_allocatedbtStridingMeshInterfaceDatas, m_allocatedBvhs, m_allocatedCollisionObjects, m_allocatedCollisionShapes, m_allocatedNames, m_allocatedTriangleIndexArrays, m_allocatedTriangleInfoMaps, m_charIndexArrays, m_collisionWorld, m_doubleVertexArrays, m_floatVertexArrays, m_indexArrays, btMeshPartData::m_indices16, btMeshPartData::m_indices32, btStridingMeshInterfaceData::m_meshPartsPtr, btStridingMeshInterfaceData::m_numMeshParts, m_shortIndexArrays, btMeshPartData::m_vertices3d, btMeshPartData::m_vertices3f, btCollisionWorld::removeCollisionObject(), and btAlignedObjectArray< T >::size().
|
protected |
Definition at line 596 of file btCollisionWorldImporter.cpp.
References l, m_allocatedNames, and btAlignedObjectArray< T >::push_back().
Referenced by convertAllObjects(), and createCollisionObject().
btOptimizedBvh * btCollisionWorldImporter::getBvhByIndex | ( | int | index | ) | const |
Definition at line 1074 of file btCollisionWorldImporter.cpp.
References m_allocatedBvhs.
btCollisionObject * btCollisionWorldImporter::getCollisionObjectByName | ( | const char * | name | ) |
Definition at line 845 of file btCollisionWorldImporter.cpp.
References btCollisionObject, btHashMap< Key, Value >::find(), and m_nameColObjMap.
btCollisionShape * btCollisionWorldImporter::getCollisionShapeByIndex | ( | int | index | ) |
Definition at line 1037 of file btCollisionWorldImporter.cpp.
References m_allocatedCollisionShapes.
btCollisionShape * btCollisionWorldImporter::getCollisionShapeByName | ( | const char * | name | ) |
Definition at line 1042 of file btCollisionWorldImporter.cpp.
References btCollisionShape, btHashMap< Key, Value >::find(), and m_nameShapeMap.
const char * btCollisionWorldImporter::getNameForPointer | ( | const void * | ptr | ) | const |
Definition at line 1052 of file btCollisionWorldImporter.cpp.
References btHashMap< Key, Value >::find(), m_objectNameMap, and ptr.
int btCollisionWorldImporter::getNumBvhs | ( | ) | const |
Definition at line 1070 of file btCollisionWorldImporter.cpp.
References m_allocatedBvhs, and btAlignedObjectArray< T >::size().
int btCollisionWorldImporter::getNumCollisionShapes | ( | ) | const |
Definition at line 1032 of file btCollisionWorldImporter.cpp.
References m_allocatedCollisionShapes, and btAlignedObjectArray< T >::size().
int btCollisionWorldImporter::getNumRigidBodies | ( | ) | const |
Definition at line 1060 of file btCollisionWorldImporter.cpp.
References m_allocatedRigidBodies, and btAlignedObjectArray< T >::size().
int btCollisionWorldImporter::getNumTriangleInfoMaps | ( | ) | const |
Definition at line 1079 of file btCollisionWorldImporter.cpp.
References m_allocatedTriangleInfoMaps, and btAlignedObjectArray< T >::size().
btCollisionObject * btCollisionWorldImporter::getRigidBodyByIndex | ( | int | index | ) | const |
Definition at line 1065 of file btCollisionWorldImporter.cpp.
References m_allocatedRigidBodies.
btTriangleInfoMap * btCollisionWorldImporter::getTriangleInfoMapByIndex | ( | int | index | ) | const |
Definition at line 1084 of file btCollisionWorldImporter.cpp.
References m_allocatedTriangleInfoMaps.
|
inline |
Definition at line 105 of file btCollisionWorldImporter.h.
References m_verboseMode.
|
inline |
Definition at line 100 of file btCollisionWorldImporter.h.
References m_verboseMode.
|
protected |
Definition at line 60 of file btCollisionWorldImporter.h.
Referenced by createStridingMeshInterfaceData(), and deleteAllData().
|
protected |
Definition at line 57 of file btCollisionWorldImporter.h.
Referenced by createOptimizedBvh(), deleteAllData(), getBvhByIndex(), and getNumBvhs().
|
protected |
Definition at line 61 of file btCollisionWorldImporter.h.
Referenced by createCollisionObject(), and deleteAllData().
|
protected |
Definition at line 54 of file btCollisionWorldImporter.h.
Referenced by createBoxShape(), createBvhTriangleMeshShape(), createCapsuleShapeX(), createCapsuleShapeY(), createCapsuleShapeZ(), createCompoundShape(), createConeShapeX(), createConeShapeY(), createConeShapeZ(), createConvexHullShape(), createCylinderShapeX(), createCylinderShapeY(), createCylinderShapeZ(), createMultiSphereShape(), createPlaneShape(), createScaledTrangleMeshShape(), createSphereShape(), deleteAllData(), getCollisionShapeByIndex(), and getNumCollisionShapes().
|
protected |
Definition at line 63 of file btCollisionWorldImporter.h.
Referenced by deleteAllData(), and duplicateName().
|
protected |
Definition at line 55 of file btCollisionWorldImporter.h.
Referenced by getNumRigidBodies(), and getRigidBodyByIndex().
|
protected |
Definition at line 59 of file btCollisionWorldImporter.h.
Referenced by createTriangleMeshContainer(), and deleteAllData().
|
protected |
Definition at line 58 of file btCollisionWorldImporter.h.
Referenced by createTriangleInfoMap(), deleteAllData(), getNumTriangleInfoMaps(), and getTriangleInfoMapByIndex().
|
protected |
Definition at line 81 of file btCollisionWorldImporter.h.
Referenced by convertAllObjects().
|
protected |
Definition at line 72 of file btCollisionWorldImporter.h.
Referenced by convertAllObjects(), and convertCollisionShape().
|
protected |
Definition at line 67 of file btCollisionWorldImporter.h.
Referenced by createMeshInterface(), and deleteAllData().
|
protected |
Definition at line 50 of file btCollisionWorldImporter.h.
Referenced by createCollisionObject(), and deleteAllData().
|
protected |
Definition at line 70 of file btCollisionWorldImporter.h.
Referenced by createMeshInterface(), and deleteAllData().
|
protected |
Definition at line 69 of file btCollisionWorldImporter.h.
Referenced by createMeshInterface(), and deleteAllData().
|
protected |
Definition at line 65 of file btCollisionWorldImporter.h.
Referenced by createMeshInterface(), and deleteAllData().
|
protected |
Definition at line 76 of file btCollisionWorldImporter.h.
Referenced by createCollisionObject(), and getCollisionObjectByName().
|
protected |
Definition at line 75 of file btCollisionWorldImporter.h.
Referenced by convertAllObjects(), and getCollisionShapeByName().
Definition at line 78 of file btCollisionWorldImporter.h.
Referenced by convertAllObjects(), createCollisionObject(), and getNameForPointer().
|
protected |
Definition at line 80 of file btCollisionWorldImporter.h.
Referenced by convertAllObjects().
|
protected |
Definition at line 66 of file btCollisionWorldImporter.h.
Referenced by createMeshInterface(), and deleteAllData().
|
protected |
Definition at line 73 of file btCollisionWorldImporter.h.
|
protected |
Definition at line 52 of file btCollisionWorldImporter.h.
Referenced by getVerboseMode(), and setVerboseMode().