Bullet Collision Detection & Physics Library: btBulletWorldImporter.cpp Source File

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btBulletWorldImporter.cpp
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2012 Erwin Coumans http://bulletphysics.org
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16#include "btBulletWorldImporter.h"
17#include "../BulletFileLoader/btBulletFile.h"
18
19#include "btBulletDynamicsCommon.h"
20#ifndef USE_GIMPACT
21#include "BulletCollision/Gimpact/btGImpactShape.h"
22#endif
23
24//#define USE_INTERNAL_EDGE_UTILITY
25#ifdef USE_INTERNAL_EDGE_UTILITY
26#include "BulletCollision/CollisionDispatch/btInternalEdgeUtility.h"
27#endif //USE_INTERNAL_EDGE_UTILITY
28
29btBulletWorldImporter::btBulletWorldImporter(btDynamicsWorld* world)
30 : btWorldImporter(world)
31{
32}
33
34btBulletWorldImporter::~btBulletWorldImporter()
35{
36}
37
38 bool btBulletWorldImporter::loadFile(const char* fileName, const char* preSwapFilenameOut)
39{
40 bParse::btBulletFile* bulletFile2 = new bParse::btBulletFile(fileName);
41
42 bool result = loadFileFromMemory(bulletFile2);
43 //now you could save the file in 'native' format using
44 //bulletFile2->writeFile("native.bullet");
45 if (result)
46 {
47 if (preSwapFilenameOut)
48 {
49 bulletFile2->preSwap();
50 bulletFile2->writeFile(preSwapFilenameOut);
51 }
52 }
53 delete bulletFile2;
54
55 return result;
56}
57
58 bool btBulletWorldImporter::loadFileFromMemory(char* memoryBuffer, int len)
59{
60 bParse::btBulletFile* bulletFile2 = new bParse::btBulletFile(memoryBuffer, len);
61
62 bool result = loadFileFromMemory(bulletFile2);
63
64 delete bulletFile2;
65
66 return result;
67}
68
69 bool btBulletWorldImporter::loadFileFromMemory(bParse::btBulletFile* bulletFile2)
70{
71 bool ok = (bulletFile2->getFlags() & bParse::FD_OK) != 0;
72
73 if (ok)
74 bulletFile2->parse(m_verboseMode);
75 else
76 return false;
77
78 if (m_verboseMode & bParse::FD_VERBOSE_DUMP_CHUNKS)
79 {
80 bulletFile2->dumpChunks(bulletFile2->getFileDNA());
81 }
82
83 return convertAllObjects(bulletFile2);
84}
85
86 bool btBulletWorldImporter::convertAllObjects(bParse::btBulletFile* bulletFile2)
87{
88 m_shapeMap.clear();
89 m_bodyMap.clear();
90
91 int i;
92
93 for (i = 0; i < bulletFile2->m_bvhs.size(); i++)
94 {
95 btOptimizedBvh* bvh = createOptimizedBvh();
96
97 if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
98 {
99 btQuantizedBvhDoubleData* bvhData = (btQuantizedBvhDoubleData*)bulletFile2->m_bvhs[i];
100 bvh->deSerializeDouble(*bvhData);
101 }
102 else
103 {
104 btQuantizedBvhFloatData* bvhData = (btQuantizedBvhFloatData*)bulletFile2->m_bvhs[i];
105 bvh->deSerializeFloat(*bvhData);
106 }
107 m_bvhMap.insert(bulletFile2->m_bvhs[i], bvh);
108 }
109
110 for (i = 0; i < bulletFile2->m_collisionShapes.size(); i++)
111 {
112 btCollisionShapeData* shapeData = (btCollisionShapeData*)bulletFile2->m_collisionShapes[i];
113 btCollisionShape* shape = convertCollisionShape(shapeData);
114 if (shape)
115 {
116 // printf("shapeMap.insert(%x,%x)\n",shapeData,shape);
117 m_shapeMap.insert(shapeData, shape);
118 }
119
120 if (shape && shapeData->m_name)
121 {
122 char* newname = duplicateName(shapeData->m_name);
123 m_objectNameMap.insert(shape, newname);
124 m_nameShapeMap.insert(newname, shape);
125 }
126 }
127
128 for (int i = 0; i < bulletFile2->m_dynamicsWorldInfo.size(); i++)
129 {
130 if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
131 {
132 btDynamicsWorldDoubleData* solverInfoData = (btDynamicsWorldDoubleData*)bulletFile2->m_dynamicsWorldInfo[i];
133 btContactSolverInfo solverInfo;
134
135 btVector3 gravity;
136 gravity.deSerializeDouble(solverInfoData->m_gravity);
137
138 solverInfo.m_tau = btScalar(solverInfoData->m_solverInfo.m_tau);
139 solverInfo.m_damping = btScalar(solverInfoData->m_solverInfo.m_damping);
140 solverInfo.m_friction = btScalar(solverInfoData->m_solverInfo.m_friction);
141 solverInfo.m_timeStep = btScalar(solverInfoData->m_solverInfo.m_timeStep);
142
143 solverInfo.m_restitution = btScalar(solverInfoData->m_solverInfo.m_restitution);
144 solverInfo.m_maxErrorReduction = btScalar(solverInfoData->m_solverInfo.m_maxErrorReduction);
145 solverInfo.m_sor = btScalar(solverInfoData->m_solverInfo.m_sor);
146 solverInfo.m_erp = btScalar(solverInfoData->m_solverInfo.m_erp);
147
148 solverInfo.m_erp2 = btScalar(solverInfoData->m_solverInfo.m_erp2);
149 solverInfo.m_globalCfm = btScalar(solverInfoData->m_solverInfo.m_globalCfm);
150 solverInfo.m_splitImpulsePenetrationThreshold = btScalar(solverInfoData->m_solverInfo.m_splitImpulsePenetrationThreshold);
151 solverInfo.m_splitImpulseTurnErp = btScalar(solverInfoData->m_solverInfo.m_splitImpulseTurnErp);
152
153 solverInfo.m_linearSlop = btScalar(solverInfoData->m_solverInfo.m_linearSlop);
154 solverInfo.m_warmstartingFactor = btScalar(solverInfoData->m_solverInfo.m_warmstartingFactor);
155 solverInfo.m_maxGyroscopicForce = btScalar(solverInfoData->m_solverInfo.m_maxGyroscopicForce);
156 solverInfo.m_singleAxisRollingFrictionThreshold = btScalar(solverInfoData->m_solverInfo.m_singleAxisRollingFrictionThreshold);
157
158 solverInfo.m_numIterations = solverInfoData->m_solverInfo.m_numIterations;
159 solverInfo.m_solverMode = solverInfoData->m_solverInfo.m_solverMode;
160 solverInfo.m_restingContactRestitutionThreshold = solverInfoData->m_solverInfo.m_restingContactRestitutionThreshold;
161 solverInfo.m_minimumSolverBatchSize = solverInfoData->m_solverInfo.m_minimumSolverBatchSize;
162
163 solverInfo.m_splitImpulse = solverInfoData->m_solverInfo.m_splitImpulse;
164
165 setDynamicsWorldInfo(gravity, solverInfo);
166 }
167 else
168 {
169 btDynamicsWorldFloatData* solverInfoData = (btDynamicsWorldFloatData*)bulletFile2->m_dynamicsWorldInfo[i];
170 btContactSolverInfo solverInfo;
171
172 btVector3 gravity;
173 gravity.deSerializeFloat(solverInfoData->m_gravity);
174
175 solverInfo.m_tau = solverInfoData->m_solverInfo.m_tau;
176 solverInfo.m_damping = solverInfoData->m_solverInfo.m_damping;
177 solverInfo.m_friction = solverInfoData->m_solverInfo.m_friction;
178 solverInfo.m_timeStep = solverInfoData->m_solverInfo.m_timeStep;
179
180 solverInfo.m_restitution = solverInfoData->m_solverInfo.m_restitution;
181 solverInfo.m_maxErrorReduction = solverInfoData->m_solverInfo.m_maxErrorReduction;
182 solverInfo.m_sor = solverInfoData->m_solverInfo.m_sor;
183 solverInfo.m_erp = solverInfoData->m_solverInfo.m_erp;
184
185 solverInfo.m_erp2 = solverInfoData->m_solverInfo.m_erp2;
186 solverInfo.m_globalCfm = solverInfoData->m_solverInfo.m_globalCfm;
187 solverInfo.m_splitImpulsePenetrationThreshold = solverInfoData->m_solverInfo.m_splitImpulsePenetrationThreshold;
188 solverInfo.m_splitImpulseTurnErp = solverInfoData->m_solverInfo.m_splitImpulseTurnErp;
189
190 solverInfo.m_linearSlop = solverInfoData->m_solverInfo.m_linearSlop;
191 solverInfo.m_warmstartingFactor = solverInfoData->m_solverInfo.m_warmstartingFactor;
192 solverInfo.m_maxGyroscopicForce = solverInfoData->m_solverInfo.m_maxGyroscopicForce;
193 solverInfo.m_singleAxisRollingFrictionThreshold = solverInfoData->m_solverInfo.m_singleAxisRollingFrictionThreshold;
194
195 solverInfo.m_numIterations = solverInfoData->m_solverInfo.m_numIterations;
196 solverInfo.m_solverMode = solverInfoData->m_solverInfo.m_solverMode;
197 solverInfo.m_restingContactRestitutionThreshold = solverInfoData->m_solverInfo.m_restingContactRestitutionThreshold;
198 solverInfo.m_minimumSolverBatchSize = solverInfoData->m_solverInfo.m_minimumSolverBatchSize;
199
200 solverInfo.m_splitImpulse = solverInfoData->m_solverInfo.m_splitImpulse;
201
202 setDynamicsWorldInfo(gravity, solverInfo);
203 }
204 }
205
206 for (i = 0; i < bulletFile2->m_rigidBodies.size(); i++)
207 {
208 if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
209 {
210 btRigidBodyDoubleData* colObjData = (btRigidBodyDoubleData*)bulletFile2->m_rigidBodies[i];
211 convertRigidBodyDouble(colObjData);
212 }
213 else
214 {
215 btRigidBodyFloatData* colObjData = (btRigidBodyFloatData*)bulletFile2->m_rigidBodies[i];
216 convertRigidBodyFloat(colObjData);
217 }
218 }
219
220 for (i = 0; i < bulletFile2->m_collisionObjects.size(); i++)
221 {
222 if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
223 {
224 btCollisionObjectDoubleData* colObjData = (btCollisionObjectDoubleData*)bulletFile2->m_collisionObjects[i];
225 btCollisionShape** shapePtr = m_shapeMap.find(colObjData->m_collisionShape);
226 if (shapePtr && *shapePtr)
227 {
228 btTransform startTransform;
229 colObjData->m_worldTransform.m_origin.m_floats[3] = 0.f;
230 startTransform.deSerializeDouble(colObjData->m_worldTransform);
231
232 btCollisionShape* shape = (btCollisionShape*)*shapePtr;
233 btCollisionObject* body = createCollisionObject(startTransform, shape, colObjData->m_name);
234 body->setFriction(btScalar(colObjData->m_friction));
235 body->setRestitution(btScalar(colObjData->m_restitution));
236
237#ifdef USE_INTERNAL_EDGE_UTILITY
238 if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
239 {
240 btBvhTriangleMeshShape* trimesh = (btBvhTriangleMeshShape*)shape;
241 if (trimesh->getTriangleInfoMap())
242 {
243 body->setCollisionFlags(body->getCollisionFlags() | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
244 }
245 }
246#endif //USE_INTERNAL_EDGE_UTILITY
247 m_bodyMap.insert(colObjData, body);
248 }
249 else
250 {
251 printf("error: no shape found\n");
252 }
253 }
254 else
255 {
256 btCollisionObjectFloatData* colObjData = (btCollisionObjectFloatData*)bulletFile2->m_collisionObjects[i];
257 btCollisionShape** shapePtr = m_shapeMap.find(colObjData->m_collisionShape);
258 if (shapePtr && *shapePtr)
259 {
260 btTransform startTransform;
261 colObjData->m_worldTransform.m_origin.m_floats[3] = 0.f;
262 startTransform.deSerializeFloat(colObjData->m_worldTransform);
263
264 btCollisionShape* shape = (btCollisionShape*)*shapePtr;
265 btCollisionObject* body = createCollisionObject(startTransform, shape, colObjData->m_name);
266
267#ifdef USE_INTERNAL_EDGE_UTILITY
268 if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
269 {
270 btBvhTriangleMeshShape* trimesh = (btBvhTriangleMeshShape*)shape;
271 if (trimesh->getTriangleInfoMap())
272 {
273 body->setCollisionFlags(body->getCollisionFlags() | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
274 }
275 }
276#endif //USE_INTERNAL_EDGE_UTILITY
277 m_bodyMap.insert(colObjData, body);
278 }
279 else
280 {
281 printf("error: no shape found\n");
282 }
283 }
284 }
285
286 for (i = 0; i < bulletFile2->m_constraints.size(); i++)
287 {
288 btTypedConstraintData2* constraintData = (btTypedConstraintData2*)bulletFile2->m_constraints[i];
289
290 btCollisionObject** colAptr = m_bodyMap.find(constraintData->m_rbA);
291 btCollisionObject** colBptr = m_bodyMap.find(constraintData->m_rbB);
292
293 btRigidBody* rbA = 0;
294 btRigidBody* rbB = 0;
295
296 if (colAptr)
297 {
298 rbA = btRigidBody::upcast(*colAptr);
299 if (!rbA)
300 rbA = &getFixedBody();
301 }
302 if (colBptr)
303 {
304 rbB = btRigidBody::upcast(*colBptr);
305 if (!rbB)
306 rbB = &getFixedBody();
307 }
308 if (!rbA && !rbB)
309 continue;
310
311 bool isDoublePrecisionData = (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION) != 0;
312
313 if (isDoublePrecisionData)
314 {
315 if (bulletFile2->getVersion() >= 282)
316 {
317 btTypedConstraintDoubleData* dc = (btTypedConstraintDoubleData*)constraintData;
318 convertConstraintDouble(dc, rbA, rbB, bulletFile2->getVersion());
319 }
320 else
321 {
322 //double-precision constraints were messed up until 2.82, try to recover data...
323
324 btTypedConstraintData* oldData = (btTypedConstraintData*)constraintData;
325
326 convertConstraintBackwardsCompatible281(oldData, rbA, rbB, bulletFile2->getVersion());
327 }
328 }
329 else
330 {
331 btTypedConstraintFloatData* dc = (btTypedConstraintFloatData*)constraintData;
332 convertConstraintFloat(dc, rbA, rbB, bulletFile2->getVersion());
333 }
334 }
335
336 return true;
337}
TRIANGLE_MESH_SHAPE_PROXYTYPE
@ TRIANGLE_MESH_SHAPE_PROXYTYPE
Definition btBroadphaseProxy.h:54
btBulletDynamicsCommon.h
btBulletFile.h
btBulletWorldImporter.h
btGImpactShape.h
btInternalEdgeUtility.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
btTypedConstraintData2
#define btTypedConstraintData2
Definition btTypedConstraint.h:27
bParse::bFile::writeFile
void writeFile(const char *fileName)
Definition bFile.cpp:538
bParse::bFile::dumpChunks
void dumpChunks(bDNA *dna)
Definition bFile.cpp:1458
bParse::bFile::getFlags
int getFlags() const
Definition bFile.h:122
bParse::bFile::getFileDNA
bDNA * getFileDNA()
Definition bFile.h:115
bParse::bFile::getVersion
int getVersion() const
Definition bFile.h:156
bParse::bFile::preSwap
void preSwap()
Definition bFile.cpp:545
bParse::btBulletFile
Definition btBulletFile.h:29
bParse::btBulletFile::m_dynamicsWorldInfo
btAlignedObjectArray< bStructHandle * > m_dynamicsWorldInfo
Definition btBulletFile.h:52
bParse::btBulletFile::m_rigidBodies
btAlignedObjectArray< bStructHandle * > m_rigidBodies
Definition btBulletFile.h:40
bParse::btBulletFile::parse
virtual void parse(int verboseMode)
Definition btBulletFile.cpp:301
bParse::btBulletFile::m_bvhs
btAlignedObjectArray< bStructHandle * > m_bvhs
Definition btBulletFile.h:48
bParse::btBulletFile::m_constraints
btAlignedObjectArray< bStructHandle * > m_constraints
Definition btBulletFile.h:46
bParse::btBulletFile::m_collisionObjects
btAlignedObjectArray< bStructHandle * > m_collisionObjects
Definition btBulletFile.h:42
bParse::btBulletFile::m_collisionShapes
btAlignedObjectArray< bStructHandle * > m_collisionShapes
Definition btBulletFile.h:44
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition btAlignedObjectArray.h:142
btBulletWorldImporter::loadFileFromMemory
bool loadFileFromMemory(char *memoryBuffer, int len)
the memoryBuffer might be modified (for example if endian swaps are necessary)
Definition btBulletWorldImporter.cpp:58
btBulletWorldImporter::btBulletWorldImporter
btBulletWorldImporter(btDynamicsWorld *world=0)
Definition btBulletWorldImporter.cpp:29
btBulletWorldImporter::loadFile
bool loadFile(const char *fileName, const char *preSwapFilenameOut=0)
if you pass a valid preSwapFilenameOut, it will save a new file with a different endianness this pre-...
Definition btBulletWorldImporter.cpp:38
btBulletWorldImporter::convertAllObjects
virtual bool convertAllObjects(bParse::btBulletFile *file)
Definition btBulletWorldImporter.cpp:86
btBulletWorldImporter::~btBulletWorldImporter
virtual ~btBulletWorldImporter()
Definition btBulletWorldImporter.cpp:34
btBvhTriangleMeshShape
The btBvhTriangleMeshShape is a static-triangle mesh shape, it can only be used for fixed/non-moving ...
Definition btBvhTriangleMeshShape.h:36
btBvhTriangleMeshShape::getTriangleInfoMap
const btTriangleInfoMap * getTriangleInfoMap() const
Definition btBvhTriangleMeshShape.h:97
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition btCollisionObject.h:51
btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK
@ CF_CUSTOM_MATERIAL_CALLBACK
Definition btCollisionObject.h:135
btCollisionObject::setRestitution
void setRestitution(btScalar rest)
Definition btCollisionObject.h:311
btCollisionObject::setCollisionFlags
void setCollisionFlags(int flags)
Definition btCollisionObject.h:494
btCollisionObject::setFriction
void setFriction(btScalar frict)
Definition btCollisionObject.h:320
btCollisionObject::getCollisionFlags
int getCollisionFlags() const
Definition btCollisionObject.h:489
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition btCollisionShape.h:28
btCollisionShape::getShapeType
int getShapeType() const
Definition btCollisionShape.h:107
btDynamicsWorld
The btDynamicsWorld is the interface class for several dynamics implementation, basic,...
Definition btDynamicsWorld.h:43
btHashMap::insert
void insert(const Key &key, const Value &value)
Definition btHashMap.h:264
btHashMap::clear
void clear()
Definition btHashMap.h:461
btHashMap::find
const Value * find(const Key &key) const
Definition btHashMap.h:424
btOptimizedBvh
The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes,...
Definition btOptimizedBvh.h:28
btQuantizedBvh::deSerializeFloat
virtual void deSerializeFloat(struct btQuantizedBvhFloatData &quantizedBvhFloatData)
Definition btQuantizedBvh.cpp:1119
btQuantizedBvh::deSerializeDouble
virtual void deSerializeDouble(struct btQuantizedBvhDoubleData &quantizedBvhDoubleData)
Definition btQuantizedBvh.cpp:1190
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition btRigidBody.h:60
btRigidBody::upcast
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
Definition btRigidBody.h:189
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition btTransform.h:30
btTransform::deSerializeFloat
void deSerializeFloat(const struct btTransformFloatData &dataIn)
Definition btTransform.h:275
btTransform::deSerializeDouble
void deSerializeDouble(const struct btTransformDoubleData &dataIn)
Definition btTransform.h:281
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition btVector3.h:82
btVector3::deSerializeFloat
void deSerializeFloat(const struct btVector3FloatData &dataIn)
Definition btVector3.h:1298
btVector3::deSerializeDouble
void deSerializeDouble(const struct btVector3DoubleData &dataIn)
Definition btVector3.h:1311
btWorldImporter
Definition btWorldImporter.h:67
btWorldImporter::duplicateName
char * duplicateName(const char *name)
Definition btWorldImporter.cpp:492
btWorldImporter::createCollisionObject
virtual btCollisionObject * createCollisionObject(const btTransform &startTransform, btCollisionShape *shape, const char *bodyName)
Definition btWorldImporter.cpp:1591
btWorldImporter::getFixedBody
static btRigidBody & getFixedBody()
Definition btWorldImporter.cpp:1801
btWorldImporter::createOptimizedBvh
virtual btOptimizedBvh * createOptimizedBvh()
acceleration and connectivity structures
Definition btWorldImporter.cpp:1718
btWorldImporter::convertConstraintBackwardsCompatible281
void convertConstraintBackwardsCompatible281(btTypedConstraintData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition btWorldImporter.cpp:506
btWorldImporter::m_bvhMap
btHashMap< btHashPtr, btOptimizedBvh * > m_bvhMap
Definition btWorldImporter.h:91
btWorldImporter::convertConstraintDouble
void convertConstraintDouble(btTypedConstraintDoubleData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition btWorldImporter.cpp:1054
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:1596
btWorldImporter::m_verboseMode
int m_verboseMode
Definition btWorldImporter.h:71
btWorldImporter::convertConstraintFloat
void convertConstraintFloat(btTypedConstraintFloatData *constraintData, btRigidBody *rbA, btRigidBody *rbB, int fileVersion)
Definition btWorldImporter.cpp:729
btWorldImporter::m_nameShapeMap
btHashMap< btHashString, btCollisionShape * > m_nameShapeMap
Definition btWorldImporter.h:94
btWorldImporter::m_shapeMap
btHashMap< btHashPtr, btCollisionShape * > m_shapeMap
Definition btWorldImporter.h:99
btWorldImporter::convertCollisionShape
btCollisionShape * convertCollisionShape(btCollisionShapeData *shapeData)
Definition btWorldImporter.cpp:142
btWorldImporter::convertRigidBodyDouble
void convertRigidBodyDouble(btRigidBodyDoubleData *colObjData)
Definition btWorldImporter.cpp:2036
btWorldImporter::convertRigidBodyFloat
void convertRigidBodyFloat(btRigidBodyFloatData *colObjData)
Definition btWorldImporter.cpp:1986
btWorldImporter::m_bodyMap
btHashMap< btHashPtr, btCollisionObject * > m_bodyMap
Definition btWorldImporter.h:100
btWorldImporter::m_objectNameMap
btHashMap< btHashPtr, const char * > m_objectNameMap
Definition btWorldImporter.h:97
bParse::FD_OK
@ FD_OK
Definition bFile.h:29
bParse::FD_DOUBLE_PRECISION
@ FD_DOUBLE_PRECISION
Definition bFile.h:35
bParse::FD_VERBOSE_DUMP_CHUNKS
@ FD_VERBOSE_DUMP_CHUNKS
Definition bFile.h:44
btCollisionObjectDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btCollisionObject.h:616
btCollisionObjectDoubleData::m_name
char * m_name
Definition btCollisionObject.h:620
btCollisionObjectDoubleData::m_restitution
double m_restitution
Definition btCollisionObject.h:633
btCollisionObjectDoubleData::m_collisionShape
void * m_collisionShape
Definition btCollisionObject.h:618
btCollisionObjectDoubleData::m_worldTransform
btTransformDoubleData m_worldTransform
Definition btCollisionObject.h:622
btCollisionObjectDoubleData::m_friction
double m_friction
Definition btCollisionObject.h:629
btCollisionObjectFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btCollisionObject.h:651
btCollisionObjectFloatData::m_name
char * m_name
Definition btCollisionObject.h:655
btCollisionObjectFloatData::m_collisionShape
void * m_collisionShape
Definition btCollisionObject.h:653
btCollisionObjectFloatData::m_worldTransform
btTransformFloatData m_worldTransform
Definition btCollisionObject.h:657
btCollisionShapeData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btCollisionShape.h:163
btCollisionShapeData::m_name
char * m_name
Definition btCollisionShape.h:164
btContactSolverInfoData::m_damping
btScalar m_damping
Definition btContactSolverInfo.h:40
btContactSolverInfoData::m_friction
btScalar m_friction
Definition btContactSolverInfo.h:41
btContactSolverInfoData::m_numIterations
int m_numIterations
Definition btContactSolverInfo.h:44
btContactSolverInfoData::m_maxErrorReduction
btScalar m_maxErrorReduction
Definition btContactSolverInfo.h:45
btContactSolverInfoData::m_sor
btScalar m_sor
Definition btContactSolverInfo.h:46
btContactSolverInfoData::m_restingContactRestitutionThreshold
int m_restingContactRestitutionThreshold
Definition btContactSolverInfo.h:63
btContactSolverInfoData::m_splitImpulsePenetrationThreshold
btScalar m_splitImpulsePenetrationThreshold
Definition btContactSolverInfo.h:57
btContactSolverInfoData::m_splitImpulse
int m_splitImpulse
Definition btContactSolverInfo.h:56
btContactSolverInfoData::m_solverMode
int m_solverMode
Definition btContactSolverInfo.h:62
btContactSolverInfoData::m_warmstartingFactor
btScalar m_warmstartingFactor
Definition btContactSolverInfo.h:60
btContactSolverInfoData::m_maxGyroscopicForce
btScalar m_maxGyroscopicForce
Definition btContactSolverInfo.h:65
btContactSolverInfoData::m_restitution
btScalar m_restitution
Definition btContactSolverInfo.h:43
btContactSolverInfoData::m_linearSlop
btScalar m_linearSlop
Definition btContactSolverInfo.h:59
btContactSolverInfoData::m_minimumSolverBatchSize
int m_minimumSolverBatchSize
Definition btContactSolverInfo.h:64
btContactSolverInfoData::m_globalCfm
btScalar m_globalCfm
Definition btContactSolverInfo.h:52
btContactSolverInfoData::m_tau
btScalar m_tau
Definition btContactSolverInfo.h:39
btContactSolverInfoData::m_splitImpulseTurnErp
btScalar m_splitImpulseTurnErp
Definition btContactSolverInfo.h:58
btContactSolverInfoData::m_erp
btScalar m_erp
Definition btContactSolverInfo.h:47
btContactSolverInfoData::m_timeStep
btScalar m_timeStep
Definition btContactSolverInfo.h:42
btContactSolverInfoData::m_singleAxisRollingFrictionThreshold
btScalar m_singleAxisRollingFrictionThreshold
Definition btContactSolverInfo.h:66
btContactSolverInfoData::m_erp2
btScalar m_erp2
Definition btContactSolverInfo.h:48
btContactSolverInfoDoubleData::m_friction
double m_friction
Definition btContactSolverInfo.h:121
btContactSolverInfoDoubleData::m_maxErrorReduction
double m_maxErrorReduction
Definition btContactSolverInfo.h:124
btContactSolverInfoDoubleData::m_numIterations
int m_numIterations
Definition btContactSolverInfo.h:137
btContactSolverInfoDoubleData::m_linearSlop
double m_linearSlop
Definition btContactSolverInfo.h:131
btContactSolverInfoDoubleData::m_globalCfm
double m_globalCfm
Definition btContactSolverInfo.h:128
btContactSolverInfoDoubleData::m_timeStep
double m_timeStep
Definition btContactSolverInfo.h:122
btContactSolverInfoDoubleData::m_minimumSolverBatchSize
int m_minimumSolverBatchSize
Definition btContactSolverInfo.h:140
btContactSolverInfoDoubleData::m_erp
double m_erp
Definition btContactSolverInfo.h:126
btContactSolverInfoDoubleData::m_splitImpulse
int m_splitImpulse
Definition btContactSolverInfo.h:141
btContactSolverInfoDoubleData::m_splitImpulsePenetrationThreshold
double m_splitImpulsePenetrationThreshold
Definition btContactSolverInfo.h:129
btContactSolverInfoDoubleData::m_damping
double m_damping
Definition btContactSolverInfo.h:120
btContactSolverInfoDoubleData::m_tau
double m_tau
Definition btContactSolverInfo.h:119
btContactSolverInfoDoubleData::m_restingContactRestitutionThreshold
int m_restingContactRestitutionThreshold
Definition btContactSolverInfo.h:139
btContactSolverInfoDoubleData::m_warmstartingFactor
double m_warmstartingFactor
Definition btContactSolverInfo.h:132
btContactSolverInfoDoubleData::m_singleAxisRollingFrictionThreshold
double m_singleAxisRollingFrictionThreshold
it is only used for 'explicit' version of gyroscopic force
Definition btContactSolverInfo.h:135
btContactSolverInfoDoubleData::m_sor
double m_sor
Definition btContactSolverInfo.h:125
btContactSolverInfoDoubleData::m_splitImpulseTurnErp
double m_splitImpulseTurnErp
Definition btContactSolverInfo.h:130
btContactSolverInfoDoubleData::m_restitution
double m_restitution
Definition btContactSolverInfo.h:123
btContactSolverInfoDoubleData::m_erp2
double m_erp2
Definition btContactSolverInfo.h:127
btContactSolverInfoDoubleData::m_solverMode
int m_solverMode
Definition btContactSolverInfo.h:138
btContactSolverInfoDoubleData::m_maxGyroscopicForce
double m_maxGyroscopicForce
Definition btContactSolverInfo.h:134
btContactSolverInfoFloatData::m_linearSlop
float m_linearSlop
Definition btContactSolverInfo.h:162
btContactSolverInfoFloatData::m_splitImpulsePenetrationThreshold
float m_splitImpulsePenetrationThreshold
Definition btContactSolverInfo.h:159
btContactSolverInfoFloatData::m_splitImpulse
int m_splitImpulse
Definition btContactSolverInfo.h:173
btContactSolverInfoFloatData::m_maxErrorReduction
float m_maxErrorReduction
Definition btContactSolverInfo.h:153
btContactSolverInfoFloatData::m_erp2
float m_erp2
Definition btContactSolverInfo.h:157
btContactSolverInfoFloatData::m_restingContactRestitutionThreshold
int m_restingContactRestitutionThreshold
Definition btContactSolverInfo.h:170
btContactSolverInfoFloatData::m_warmstartingFactor
float m_warmstartingFactor
Definition btContactSolverInfo.h:163
btContactSolverInfoFloatData::m_damping
float m_damping
Definition btContactSolverInfo.h:148
btContactSolverInfoFloatData::m_restitution
float m_restitution
Definition btContactSolverInfo.h:152
btContactSolverInfoFloatData::m_minimumSolverBatchSize
int m_minimumSolverBatchSize
Definition btContactSolverInfo.h:172
btContactSolverInfoFloatData::m_sor
float m_sor
Definition btContactSolverInfo.h:154
btContactSolverInfoFloatData::m_timeStep
float m_timeStep
Definition btContactSolverInfo.h:150
btContactSolverInfoFloatData::m_friction
float m_friction
Definition btContactSolverInfo.h:149
btContactSolverInfoFloatData::m_maxGyroscopicForce
float m_maxGyroscopicForce
Definition btContactSolverInfo.h:165
btContactSolverInfoFloatData::m_tau
float m_tau
Definition btContactSolverInfo.h:147
btContactSolverInfoFloatData::m_erp
float m_erp
Definition btContactSolverInfo.h:155
btContactSolverInfoFloatData::m_splitImpulseTurnErp
float m_splitImpulseTurnErp
Definition btContactSolverInfo.h:160
btContactSolverInfoFloatData::m_solverMode
int m_solverMode
Definition btContactSolverInfo.h:169
btContactSolverInfoFloatData::m_numIterations
int m_numIterations
Definition btContactSolverInfo.h:168
btContactSolverInfoFloatData::m_singleAxisRollingFrictionThreshold
float m_singleAxisRollingFrictionThreshold
Definition btContactSolverInfo.h:167
btContactSolverInfoFloatData::m_globalCfm
float m_globalCfm
Definition btContactSolverInfo.h:158
btContactSolverInfo
Definition btContactSolverInfo.h:76
btDynamicsWorldDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btDynamicsWorld.h:162
btDynamicsWorldDoubleData::m_solverInfo
btContactSolverInfoDoubleData m_solverInfo
Definition btDynamicsWorld.h:163
btDynamicsWorldDoubleData::m_gravity
btVector3DoubleData m_gravity
Definition btDynamicsWorld.h:164
btDynamicsWorldFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btDynamicsWorld.h:169
btDynamicsWorldFloatData::m_gravity
btVector3FloatData m_gravity
Definition btDynamicsWorld.h:171
btDynamicsWorldFloatData::m_solverInfo
btContactSolverInfoFloatData m_solverInfo
Definition btDynamicsWorld.h:170
btQuantizedBvhDoubleData
Definition btQuantizedBvh.h:521
btQuantizedBvhFloatData
Definition btQuantizedBvh.h:504
btRigidBodyDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btRigidBody.h:662
btRigidBodyFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btRigidBody.h:636
btTransformDoubleData::m_origin
btVector3DoubleData m_origin
Definition btTransform.h:254
btTransformFloatData::m_origin
btVector3FloatData m_origin
Definition btTransform.h:248
btTypedConstraintData
this structure is not used, except for loading pre-2.82 .bullet files
Definition btTypedConstraint.h:388
btTypedConstraintDoubleData
Definition btTypedConstraint.h:411
btTypedConstraintFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition btTypedConstraint.h:359
btVector3DoubleData::m_floats
double m_floats[4]
Definition btVector3.h:1288
btVector3FloatData::m_floats
float m_floats[4]
Definition btVector3.h:1283