Bullet Collision Detection & Physics Library: btWorldImporter.h Source File

Bullet Collision Detection & Physics Library

btWorldImporter.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2012 Erwin Coumans http://bulletphysics.org
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16 #ifndef BT_WORLD_IMPORTER_H
17 #define BT_WORLD_IMPORTER_H
18
19 #include "LinearMath/btTransform.h"
20 #include "LinearMath/btVector3.h"
21 #include "LinearMath/btAlignedObjectArray.h"
22 #include "LinearMath/btHashMap.h"
23
24 class btCollisionShape;
25 class btCollisionObject;
26 class btRigidBody;
27 class btTypedConstraint;
28 class btDynamicsWorld;
29 struct ConstraintInput;
30 class btRigidBodyColladaInfo;
31 struct btCollisionShapeData;
32 class btTriangleIndexVertexArray;
33 class btStridingMeshInterface;
34 struct btStridingMeshInterfaceData;
35 class btGImpactMeshShape;
36 class btOptimizedBvh;
37 struct btTriangleInfoMap;
38 class btBvhTriangleMeshShape;
39 class btPoint2PointConstraint;
40 class btHingeConstraint;
41 class btConeTwistConstraint;
42 class btGeneric6DofConstraint;
43 class btGeneric6DofSpringConstraint;
44 class btGeneric6DofSpring2Constraint;
45 class btSliderConstraint;
46 class btGearConstraint;
47 struct btContactSolverInfo;
48 struct btTypedConstraintData;
49 struct btTypedConstraintFloatData;
50 struct btTypedConstraintDoubleData;
51
52 struct btRigidBodyDoubleData;
53 struct btRigidBodyFloatData;
54
55 #ifdef BT_USE_DOUBLE_PRECISION
56 #define btRigidBodyData btRigidBodyDoubleData
57 #else
58 #define btRigidBodyData btRigidBodyFloatData
59 #endif //BT_USE_DOUBLE_PRECISION
60
61 enum btWorldImporterFlags
62 {
63 eRESTORE_EXISTING_OBJECTS = 1, //don't create new objects
64 };
65
66 class btWorldImporter
67 {
68 protected:
69 btDynamicsWorld* m_dynamicsWorld;
70
71 int m_verboseMode;
72 int m_importerFlags;
73
74 btAlignedObjectArray<btCollisionShape*> m_allocatedCollisionShapes;
75 btAlignedObjectArray<btCollisionObject*> m_allocatedRigidBodies;
76 btAlignedObjectArray<btTypedConstraint*> m_allocatedConstraints;
77 btAlignedObjectArray<btOptimizedBvh*> m_allocatedBvhs;
78 btAlignedObjectArray<btTriangleInfoMap*> m_allocatedTriangleInfoMaps;
79 btAlignedObjectArray<btTriangleIndexVertexArray*> m_allocatedTriangleIndexArrays;
80 btAlignedObjectArray<btStridingMeshInterfaceData*> m_allocatedbtStridingMeshInterfaceDatas;
81
82 btAlignedObjectArray<char*> m_allocatedNames;
83
84 btAlignedObjectArray<int*> m_indexArrays;
85 btAlignedObjectArray<short int*> m_shortIndexArrays;
86 btAlignedObjectArray<unsigned char*> m_charIndexArrays;
87
88 btAlignedObjectArray<btVector3FloatData*> m_floatVertexArrays;
89 btAlignedObjectArray<btVector3DoubleData*> m_doubleVertexArrays;
90
91 btHashMap<btHashPtr, btOptimizedBvh*> m_bvhMap;
92 btHashMap<btHashPtr, btTriangleInfoMap*> m_timMap;
93
94 btHashMap<btHashString, btCollisionShape*> m_nameShapeMap;
95 btHashMap<btHashString, btRigidBody*> m_nameBodyMap;
96 btHashMap<btHashString, btTypedConstraint*> m_nameConstraintMap;
97 btHashMap<btHashPtr, const char*> m_objectNameMap;
98
99 btHashMap<btHashPtr, btCollisionShape*> m_shapeMap;
100 btHashMap<btHashPtr, btCollisionObject*> m_bodyMap;
101
102 //methods
103
104 static btRigidBody& getFixedBody();
105
106 char* duplicateName(const char* name);
107
108 btCollisionShape* convertCollisionShape(btCollisionShapeData* shapeData);
109
110 void convertConstraintBackwardsCompatible281(btTypedConstraintData* constraintData, btRigidBody* rbA, btRigidBody* rbB, int fileVersion);
111 void convertConstraintFloat(btTypedConstraintFloatData* constraintData, btRigidBody* rbA, btRigidBody* rbB, int fileVersion);
112 void convertConstraintDouble(btTypedConstraintDoubleData* constraintData, btRigidBody* rbA, btRigidBody* rbB, int fileVersion);
113 void convertRigidBodyFloat(btRigidBodyFloatData* colObjData);
114 void convertRigidBodyDouble(btRigidBodyDoubleData* colObjData);
115
116 public:
117 btWorldImporter(btDynamicsWorld* world);
118
119 virtual ~btWorldImporter();
120
123 virtual void deleteAllData();
124
125 void setVerboseMode(int verboseMode)
126 {
127 m_verboseMode = verboseMode;
128 }
129
130 int getVerboseMode() const
131 {
132 return m_verboseMode;
133 }
134
135 void setImporterFlags(int importerFlags)
136 {
137 m_importerFlags = importerFlags;
138 }
139
140 int getImporterFlags() const
141 {
142 return m_importerFlags;
143 }
144
145 // query for data
146 int getNumCollisionShapes() const;
147 btCollisionShape* getCollisionShapeByIndex(int index);
148 int getNumRigidBodies() const;
149 btCollisionObject* getRigidBodyByIndex(int index) const;
150 int getNumConstraints() const;
151 btTypedConstraint* getConstraintByIndex(int index) const;
152 int getNumBvhs() const;
153 btOptimizedBvh* getBvhByIndex(int index) const;
154 int getNumTriangleInfoMaps() const;
155 btTriangleInfoMap* getTriangleInfoMapByIndex(int index) const;
156
157 // queris involving named objects
158 btCollisionShape* getCollisionShapeByName(const char* name);
159 btRigidBody* getRigidBodyByName(const char* name);
160 btTypedConstraint* getConstraintByName(const char* name);
161 const char* getNameForPointer(const void* ptr) const;
162
164
165 virtual void setDynamicsWorldInfo(const btVector3& gravity, const btContactSolverInfo& solverInfo);
166
167 //bodies
168 virtual btRigidBody* createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform, btCollisionShape* shape, const char* bodyName);
169 virtual btCollisionObject* createCollisionObject(const btTransform& startTransform, btCollisionShape* shape, const char* bodyName);
170
172
173 virtual btCollisionShape* createPlaneShape(const btVector3& planeNormal, btScalar planeConstant);
174 virtual btCollisionShape* createBoxShape(const btVector3& halfExtents);
175 virtual btCollisionShape* createSphereShape(btScalar radius);
176 virtual btCollisionShape* createCapsuleShapeX(btScalar radius, btScalar height);
177 virtual btCollisionShape* createCapsuleShapeY(btScalar radius, btScalar height);
178 virtual btCollisionShape* createCapsuleShapeZ(btScalar radius, btScalar height);
179
180 virtual btCollisionShape* createCylinderShapeX(btScalar radius, btScalar height);
181 virtual btCollisionShape* createCylinderShapeY(btScalar radius, btScalar height);
182 virtual btCollisionShape* createCylinderShapeZ(btScalar radius, btScalar height);
183 virtual btCollisionShape* createConeShapeX(btScalar radius, btScalar height);
184 virtual btCollisionShape* createConeShapeY(btScalar radius, btScalar height);
185 virtual btCollisionShape* createConeShapeZ(btScalar radius, btScalar height);
186 virtual class btTriangleIndexVertexArray* createTriangleMeshContainer();
187 virtual btBvhTriangleMeshShape* createBvhTriangleMeshShape(btStridingMeshInterface* trimesh, btOptimizedBvh* bvh);
188 virtual btCollisionShape* createConvexTriangleMeshShape(btStridingMeshInterface* trimesh);
189 virtual btGImpactMeshShape* createGimpactShape(btStridingMeshInterface* trimesh);
190 virtual btStridingMeshInterfaceData* createStridingMeshInterfaceData(btStridingMeshInterfaceData* interfaceData);
191
192 virtual class btConvexHullShape* createConvexHullShape();
193 virtual class btCompoundShape* createCompoundShape();
194 virtual class btScaledBvhTriangleMeshShape* createScaledTrangleMeshShape(btBvhTriangleMeshShape* meshShape, const btVector3& localScalingbtBvhTriangleMeshShape);
195
196 virtual class btMultiSphereShape* createMultiSphereShape(const btVector3* positions, const btScalar* radi, int numSpheres);
197
198 virtual btTriangleIndexVertexArray* createMeshInterface(btStridingMeshInterfaceData& meshData);
199
201 virtual btOptimizedBvh* createOptimizedBvh();
202 virtual btTriangleInfoMap* createTriangleInfoMap();
203
205 virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& pivotInA, const btVector3& pivotInB);
206 virtual btPoint2PointConstraint* createPoint2PointConstraint(btRigidBody& rbA, const btVector3& pivotInA);
207 virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA = false);
208 virtual btHingeConstraint* createHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame, bool useReferenceFrameA = false);
209 virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame);
210 virtual btConeTwistConstraint* createConeTwistConstraint(btRigidBody& rbA, const btTransform& rbAFrame);
211 virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA);
212 virtual btGeneric6DofConstraint* createGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB);
213 virtual btGeneric6DofSpringConstraint* createGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA);
214 virtual btGeneric6DofSpring2Constraint* createGeneric6DofSpring2Constraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, int rotateOrder);
215
216 virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA);
217 virtual btSliderConstraint* createSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA);
218 virtual btGearConstraint* createGearConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& axisInA, const btVector3& axisInB, btScalar ratio);
219 };
220
221 #endif //BT_WORLD_IMPORTER_H
btWorldImporter::createGeneric6DofSpringConstraint
virtual btGeneric6DofSpringConstraint * createGeneric6DofSpringConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
Definition: btWorldImporter.cpp:1857
btWorldImporter::m_nameShapeMap
btHashMap< btHashString, btCollisionShape * > m_nameShapeMap
Definition: btWorldImporter.h:94
btWorldImporter::createGeneric6DofConstraint
virtual btGeneric6DofConstraint * createGeneric6DofConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
Definition: btWorldImporter.cpp:1836
btWorldImporter::convertConstraintBackwardsCompatible281
void convertConstraintBackwardsCompatible281(btTypedConstraintData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition: btWorldImporter.cpp:505
btWorldImporter::convertCollisionShape
btCollisionShape * convertCollisionShape(btCollisionShapeData *shapeData)
Definition: btWorldImporter.cpp:141
btWorldImporter::getTriangleInfoMapByIndex
btTriangleInfoMap * getTriangleInfoMapByIndex(int index) const
Definition: btWorldImporter.cpp:1967
btWorldImporter::createStridingMeshInterfaceData
virtual btStridingMeshInterfaceData * createStridingMeshInterfaceData(btStridingMeshInterfaceData *interfaceData)
Definition: btWorldImporter.cpp:1499
btPoint2PointConstraint
point to point constraint between two rigidbodies each with a pivotpoint that descibes the &#39;ballsocke...
Definition: btPoint2PointConstraint.h:52
btWorldImporter::createTriangleMeshContainer
virtual class btTriangleIndexVertexArray * createTriangleMeshContainer()
Definition: btWorldImporter.cpp:1710
btWorldImporter::convertRigidBodyDouble
void convertRigidBodyDouble(btRigidBodyDoubleData *colObjData)
Definition: btWorldImporter.cpp:2022
btWorldImporter::createBvhTriangleMeshShape
virtual btBvhTriangleMeshShape * createBvhTriangleMeshShape(btStridingMeshInterface *trimesh, btOptimizedBvh *bvh)
Definition: btWorldImporter.cpp:1731
btWorldImporter
Definition: btWorldImporter.h:66
btWorldImporter::createSphereShape
virtual btCollisionShape * createSphereShape(btScalar radius)
Definition: btWorldImporter.cpp:1640
btWorldImporter::createConeTwistConstraint
virtual btConeTwistConstraint * createConeTwistConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame)
Definition: btWorldImporter.cpp:1822
btWorldImporter::createTriangleInfoMap
virtual btTriangleInfoMap * createTriangleInfoMap()
Definition: btWorldImporter.cpp:1724
btWorldImporter::convertRigidBodyFloat
void convertRigidBodyFloat(btRigidBodyFloatData *colObjData)
Definition: btWorldImporter.cpp:1972
btWorldImporter::createCylinderShapeZ
virtual btCollisionShape * createCylinderShapeZ(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1682
btAlignedObjectArray
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
Definition: btAlignedObjectArray.h:52
btWorldImporter::m_charIndexArrays
btAlignedObjectArray< unsigned char * > m_charIndexArrays
Definition: btWorldImporter.h:86
btVector3.h
btWorldImporterFlags
btWorldImporterFlags
Definition: btWorldImporter.h:61
btWorldImporter::m_nameBodyMap
btHashMap< btHashString, btRigidBody * > m_nameBodyMap
Definition: btWorldImporter.h:95
btGearConstraint
The btGeatConstraint will couple the angular velocity for two bodies around given local axis and rati...
Definition: btGearConstraint.h:31
btMultiSphereShape
The btMultiSphereShape represents the convex hull of a collection of spheres.
Definition: btMultiSphereShape.h:26
btWorldImporter::createRigidBody
virtual btRigidBody * createRigidBody(bool isDynamic, btScalar mass, const btTransform &startTransform, btCollisionShape *shape, const char *bodyName)
Definition: btWorldImporter.cpp:1604
btGeneric6DofConstraint
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis locatio...
Definition: btGeneric6DofConstraint.h:266
btWorldImporter::btWorldImporter
btWorldImporter(btDynamicsWorld *world)
Definition: btWorldImporter.cpp:21
btDynamicsWorld
The btDynamicsWorld is the interface class for several dynamics implementation, basic, discrete, parallel, and continuous etc.
Definition: btDynamicsWorld.h:41
btWorldImporter::m_bodyMap
btHashMap< btHashPtr, btCollisionObject * > m_bodyMap
Definition: btWorldImporter.h:100
btWorldImporter::createConvexHullShape
virtual class btConvexHullShape * createConvexHullShape()
Definition: btWorldImporter.cpp:1759
btWorldImporter::getImporterFlags
int getImporterFlags() const
Definition: btWorldImporter.h:140
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition: btCollisionShape.h:26
btWorldImporter::getNumCollisionShapes
int getNumCollisionShapes() const
Definition: btWorldImporter.cpp:1886
btWorldImporter::m_shortIndexArrays
btAlignedObjectArray< short int * > m_shortIndexArrays
Definition: btWorldImporter.h:85
btWorldImporter::createConvexTriangleMeshShape
virtual btCollisionShape * createConvexTriangleMeshShape(btStridingMeshInterface *trimesh)
Definition: btWorldImporter.cpp:1745
btWorldImporter::createCapsuleShapeY
virtual btCollisionShape * createCapsuleShapeY(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1654
btWorldImporter::createCylinderShapeX
virtual btCollisionShape * createCylinderShapeX(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1668
btWorldImporter::getCollisionShapeByName
btCollisionShape * getCollisionShapeByName(const char *name)
Definition: btWorldImporter.cpp:1896
btTransform.h
btWorldImporter::createCylinderShapeY
virtual btCollisionShape * createCylinderShapeY(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1675
btWorldImporter::m_allocatedBvhs
btAlignedObjectArray< btOptimizedBvh * > m_allocatedBvhs
Definition: btWorldImporter.h:77
btWorldImporter::createConeShapeX
virtual btCollisionShape * createConeShapeX(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1689
btGImpactMeshShape
This class manages a mesh supplied by the btStridingMeshInterface interface.
Definition: btGImpactShape.h:842
btWorldImporter::createCapsuleShapeZ
virtual btCollisionShape * createCapsuleShapeZ(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1661
btHingeConstraint
hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in lo...
Definition: btHingeConstraint.h:47
btGeneric6DofSpring2Constraint
Definition: btGeneric6DofSpring2Constraint.h:271
btHashMap
The btHashMap template class implements a generic and lightweight hashmap.
Definition: btHashMap.h:219
btWorldImporter::createPlaneShape
virtual btCollisionShape * createPlaneShape(const btVector3 &planeNormal, btScalar planeConstant)
shapes
Definition: btWorldImporter.cpp:1628
btWorldImporter::getVerboseMode
int getVerboseMode() const
Definition: btWorldImporter.h:130
btWorldImporter::m_allocatedTriangleInfoMaps
btAlignedObjectArray< btTriangleInfoMap * > m_allocatedTriangleInfoMaps
Definition: btWorldImporter.h:78
btWorldImporter::deleteAllData
virtual void deleteAllData()
delete all memory collision shapes, rigid bodies, constraints etc.
Definition: btWorldImporter.cpp:32
btWorldImporter::getConstraintByName
btTypedConstraint * getConstraintByName(const char *name)
Definition: btWorldImporter.cpp:1916
btWorldImporter::m_objectNameMap
btHashMap< btHashPtr, const char * > m_objectNameMap
Definition: btWorldImporter.h:97
btWorldImporter::getNumRigidBodies
int getNumRigidBodies() const
Definition: btWorldImporter.cpp:1934
btWorldImporter::createCompoundShape
virtual class btCompoundShape * createCompoundShape()
Definition: btWorldImporter.cpp:1766
btBvhTriangleMeshShape
The btBvhTriangleMeshShape is a static-triangle mesh shape, it can only be used for fixed/non-moving ...
Definition: btBvhTriangleMeshShape.h:34
btWorldImporter::m_verboseMode
int m_verboseMode
Definition: btWorldImporter.h:71
btWorldImporter::getRigidBodyByIndex
btCollisionObject * getRigidBodyByIndex(int index) const
Definition: btWorldImporter.cpp:1939
btStridingMeshInterfaceData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btStridingMeshInterface.h:138
btTriangleIndexVertexArray
The btTriangleIndexVertexArray allows to access multiple triangle meshes, by indexing into existing t...
Definition: btTriangleIndexVertexArray.h:65
btWorldImporter::m_doubleVertexArrays
btAlignedObjectArray< btVector3DoubleData * > m_doubleVertexArrays
Definition: btWorldImporter.h:89
btWorldImporter::m_allocatedbtStridingMeshInterfaceDatas
btAlignedObjectArray< btStridingMeshInterfaceData * > m_allocatedbtStridingMeshInterfaceDatas
Definition: btWorldImporter.h:80
btWorldImporter::createGimpactShape
virtual btGImpactMeshShape * createGimpactShape(btStridingMeshInterface *trimesh)
Definition: btWorldImporter.cpp:1749
btWorldImporter::createGearConstraint
virtual btGearConstraint * createGearConstraint(btRigidBody &rbA, btRigidBody &rbB, const btVector3 &axisInA, const btVector3 &axisInB, btScalar ratio)
Definition: btWorldImporter.cpp:1878
btWorldImporter::getBvhByIndex
btOptimizedBvh * getBvhByIndex(int index) const
Definition: btWorldImporter.cpp:1957
btRigidBodyDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btRigidBody.h:569
btWorldImporter::createConeShapeZ
virtual btCollisionShape * createConeShapeZ(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1703
btWorldImporter::createOptimizedBvh
virtual btOptimizedBvh * createOptimizedBvh()
acceleration and connectivity structures
Definition: btWorldImporter.cpp:1717
eRESTORE_EXISTING_OBJECTS
Definition: btWorldImporter.h:63
btWorldImporter::m_timMap
btHashMap< btHashPtr, btTriangleInfoMap * > m_timMap
Definition: btWorldImporter.h:92
btWorldImporter::duplicateName
char * duplicateName(const char *name)
Definition: btWorldImporter.cpp:491
btWorldImporter::m_nameConstraintMap
btHashMap< btHashString, btTypedConstraint * > m_nameConstraintMap
Definition: btWorldImporter.h:96
btTypedConstraintDoubleData
Definition: btTypedConstraint.h:410
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:48
btWorldImporter::createBoxShape
virtual btCollisionShape * createBoxShape(const btVector3 &halfExtents)
Definition: btWorldImporter.cpp:1634
btWorldImporter::m_allocatedConstraints
btAlignedObjectArray< btTypedConstraint * > m_allocatedConstraints
Definition: btWorldImporter.h:76
btWorldImporter::createScaledTrangleMeshShape
virtual class btScaledBvhTriangleMeshShape * createScaledTrangleMeshShape(btBvhTriangleMeshShape *meshShape, const btVector3 &localScalingbtBvhTriangleMeshShape)
Definition: btWorldImporter.cpp:1773
btWorldImporter::createGeneric6DofSpring2Constraint
virtual btGeneric6DofSpring2Constraint * createGeneric6DofSpring2Constraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, int rotateOrder)
Definition: btWorldImporter.cpp:1850
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:59
btOptimizedBvh
The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface.
Definition: btOptimizedBvh.h:26
btWorldImporter::createCollisionObject
virtual btCollisionObject * createCollisionObject(const btTransform &startTransform, btCollisionShape *shape, const char *bodyName)
Definition: btWorldImporter.cpp:1590
btRigidBodyFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btRigidBody.h:543
btTypedConstraintData
this structure is not used, except for loading pre-2.82 .bullet files
Definition: btTypedConstraint.h:387
btWorldImporter::m_indexArrays
btAlignedObjectArray< int * > m_indexArrays
Definition: btWorldImporter.h:84
btWorldImporter::m_importerFlags
int m_importerFlags
Definition: btWorldImporter.h:72
btWorldImporter::convertConstraintFloat
void convertConstraintFloat(btTypedConstraintFloatData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition: btWorldImporter.cpp:728
btWorldImporter::setDynamicsWorldInfo
virtual void setDynamicsWorldInfo(const btVector3 &gravity, const btContactSolverInfo &solverInfo)
those virtuals are called by load and can be overridden by the user
Definition: btWorldImporter.cpp:1595
btWorldImporter::createMeshInterface
virtual btTriangleIndexVertexArray * createMeshInterface(btStridingMeshInterfaceData &meshData)
Definition: btWorldImporter.cpp:1382
btWorldImporter::createConeShapeY
virtual btCollisionShape * createConeShapeY(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1696
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:80
btWorldImporter::getNumConstraints
int getNumConstraints() const
Definition: btWorldImporter.cpp:1943
btWorldImporter::createPoint2PointConstraint
virtual btPoint2PointConstraint * createPoint2PointConstraint(btRigidBody &rbA, btRigidBody &rbB, const btVector3 &pivotInA, const btVector3 &pivotInB)
constraints
Definition: btWorldImporter.cpp:1794
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:28
btConeTwistConstraint
btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc) ...
Definition: btConeTwistConstraint.h:57
btContactSolverInfo
Definition: btContactSolverInfo.h:69
btStridingMeshInterface
The btStridingMeshInterface is the interface class for high performance generic access to triangle me...
Definition: btStridingMeshInterface.h:26
btWorldImporter::m_allocatedNames
btAlignedObjectArray< char * > m_allocatedNames
Definition: btWorldImporter.h:82
btWorldImporter::getConstraintByIndex
btTypedConstraint * getConstraintByIndex(int index) const
Definition: btWorldImporter.cpp:1948
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition: btTypedConstraint.h:74
btWorldImporter::getNameForPointer
const char * getNameForPointer(const void *ptr) const
Definition: btWorldImporter.cpp:1926
btWorldImporter::getFixedBody
static btRigidBody & getFixedBody()
Definition: btWorldImporter.cpp:1787
btWorldImporter::setVerboseMode
void setVerboseMode(int verboseMode)
Definition: btWorldImporter.h:125
btWorldImporter::getNumTriangleInfoMaps
int getNumTriangleInfoMaps() const
Definition: btWorldImporter.cpp:1962
btWorldImporter::m_allocatedCollisionShapes
btAlignedObjectArray< btCollisionShape * > m_allocatedCollisionShapes
Definition: btWorldImporter.h:74
btWorldImporter::createHingeConstraint
virtual btHingeConstraint * createHingeConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame, bool useReferenceFrameA=false)
Definition: btWorldImporter.cpp:1808
btScaledBvhTriangleMeshShape
The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMesh...
Definition: btScaledBvhTriangleMeshShape.h:23
btWorldImporter::getCollisionShapeByIndex
btCollisionShape * getCollisionShapeByIndex(int index)
Definition: btWorldImporter.cpp:1891
btWorldImporter::getRigidBodyByName
btRigidBody * getRigidBodyByName(const char *name)
Definition: btWorldImporter.cpp:1906
btAlignedObjectArray.h
btSliderConstraint
Definition: btSliderConstraint.h:65
btWorldImporter::createSliderConstraint
virtual btSliderConstraint * createSliderConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
Definition: btWorldImporter.cpp:1864
btConvexHullShape
The btConvexHullShape implements an implicit convex hull of an array of vertices. ...
Definition: btConvexHullShape.h:25
btWorldImporter::m_shapeMap
btHashMap< btHashPtr, btCollisionShape * > m_shapeMap
Definition: btWorldImporter.h:99
btTriangleInfoMap
The btTriangleInfoMap stores edge angle information for some triangles. You can compute this informat...
Definition: btTriangleInfoMap.h:53
btCompoundShape
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
Definition: btCompoundShape.h:55
btWorldImporter::m_allocatedTriangleIndexArrays
btAlignedObjectArray< btTriangleIndexVertexArray * > m_allocatedTriangleIndexArrays
Definition: btWorldImporter.h:79
btWorldImporter::m_allocatedRigidBodies
btAlignedObjectArray< btCollisionObject * > m_allocatedRigidBodies
Definition: btWorldImporter.h:75
btWorldImporter::~btWorldImporter
virtual ~btWorldImporter()
Definition: btWorldImporter.cpp:28
btWorldImporter::m_bvhMap
btHashMap< btHashPtr, btOptimizedBvh * > m_bvhMap
Definition: btWorldImporter.h:91
btWorldImporter::m_dynamicsWorld
btDynamicsWorld * m_dynamicsWorld
Definition: btWorldImporter.h:69
btHashMap.h
btWorldImporter::setImporterFlags
void setImporterFlags(int importerFlags)
Definition: btWorldImporter.h:135
btWorldImporter::m_floatVertexArrays
btAlignedObjectArray< btVector3FloatData * > m_floatVertexArrays
Definition: btWorldImporter.h:88
btWorldImporter::createCapsuleShapeX
virtual btCollisionShape * createCapsuleShapeX(btScalar radius, btScalar height)
Definition: btWorldImporter.cpp:1647
btGeneric6DofSpringConstraint
Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF...
Definition: btGeneric6DofSpringConstraint.h:41
btCollisionShapeData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btCollisionShape.h:151
btWorldImporter::createMultiSphereShape
virtual class btMultiSphereShape * createMultiSphereShape(const btVector3 *positions, const btScalar *radi, int numSpheres)
Definition: btWorldImporter.cpp:1780
btTypedConstraintFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btTypedConstraint.h:358
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:294
btWorldImporter::convertConstraintDouble
void convertConstraintDouble(btTypedConstraintDoubleData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition: btWorldImporter.cpp:1053
btWorldImporter::getNumBvhs
int getNumBvhs() const
Definition: btWorldImporter.cpp:1953