@gg-web-engine/ammo 0.0.30 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2380 @@
1
+ interface TopLevelFunctions {
2
+ [Value] static btVector3 quatRotate_([Const, Ref] btQuaternion rotation, [Const, Ref] btVector3 v);
3
+ static void set_gContactAddedCallback(VoidPtr cb);
4
+ };
5
+
6
+ interface AdapterFunctions {
7
+ static void setInternalTickCallback(btDynamicsWorld world, VoidPtr cb, optional VoidPtr worldUserInfo, optional boolean isPreTick);
8
+ };
9
+
10
+ interface Clone {
11
+ static btVector3 Vector3([Const, Ref] btVector3 v);
12
+ static btQuaternion Quaternion([Const, Ref] btQuaternion q);
13
+ };
14
+
15
+ // Linear Math
16
+
17
+ interface btIDebugDraw {
18
+ void drawLine([Const, Ref] btVector3 from, [Const, Ref] btVector3 to, [Const, Ref] btVector3 color);
19
+ void drawContactPoint([Const, Ref] btVector3 pointOnB, [Const, Ref] btVector3 normalOnB, float distance, long lifeTime, [Const, Ref] btVector3 color);
20
+ void reportErrorWarning([Const] DOMString warningString);
21
+ void draw3dText([Const, Ref] btVector3 location, [Const] DOMString textString);
22
+ void setDebugMode(long debugMode);
23
+ long getDebugMode();
24
+ };
25
+
26
+ [JSImplementation="btIDebugDraw"]
27
+ interface DebugDrawer {
28
+ void DebugDrawer();
29
+ void drawLine([Const, Ref] btVector3 from, [Const, Ref] btVector3 to, [Const, Ref] btVector3 color);
30
+ void drawContactPoint([Const, Ref] btVector3 pointOnB, [Const, Ref] btVector3 normalOnB, float distance, long lifeTime, [Const, Ref] btVector3 color);
31
+ void reportErrorWarning([Const] DOMString warningString);
32
+ void draw3dText([Const, Ref] btVector3 location, [Const] DOMString textString);
33
+ void setDebugMode(long debugMode);
34
+ [Const] long getDebugMode();
35
+ };
36
+
37
+ interface btVector3 {
38
+ void btVector3();
39
+ // void btVector3([Const, Ref] btVector3 v);
40
+ void btVector3(float x, float y, float z);
41
+ float length();
42
+ float x();
43
+ float y();
44
+ float z();
45
+ void setX(float x);
46
+ void setY(float y);
47
+ void setZ(float z);
48
+ void setValue(float x, float y, float z);
49
+ void normalize();
50
+ [Value] btVector3 normalized();
51
+ [Value] btVector3 rotate([Const, Ref] btVector3 wAxis, [Const] float angle);
52
+ float dot([Ref] btVector3 v);
53
+ float angle([Const, Ref] btVector3 v);
54
+ [Value] btVector3 absolute();
55
+ [Value] btVector3 cross([Const, Ref] btVector3 v);
56
+ float triple([Const, Ref] btVector3 v1, [Const, Ref] btVector3 v2);
57
+ long minAxis();
58
+ long maxAxis();
59
+ long furthestAxis();
60
+ long closestAxis();
61
+ void setInterpolate3([Const, Ref] btVector3 v0, [Const, Ref] btVector3 v1, float rt);
62
+ // [Value] btVector3 lerp([Const, Ref] btVector3 v, [Const, Ref] float t);
63
+ [Operator="*=", Ref] btVector3 op_mul(float x);
64
+ [Operator="+=", Ref] btVector3 op_add([Ref] btVector3 v);
65
+ [Operator="-=", Ref] btVector3 op_sub([Ref] btVector3 v);
66
+ };
67
+
68
+ interface btVector4 {
69
+ void btVector4();
70
+ void btVector4(float x, float y, float z, float w);
71
+ float w();
72
+ [Value] btVector4 absolute4();
73
+ long maxAxis4();
74
+ long minAxis4();
75
+ long closestAxis4();
76
+ [Operator="="] void op_set([Const, Ref] btVector4 v);
77
+
78
+ // cannot be included because btVector4 doesn't implement btVector3::setValue(x, y, z)
79
+ // void setValue(float x, float y, float z, float w);
80
+
81
+ float length();
82
+ float x();
83
+ float y();
84
+ float z();
85
+ void setX(float x);
86
+ void setY(float y);
87
+ void setZ(float z);
88
+ void normalize();
89
+ [Value] btVector3 normalized();
90
+ [Value] btVector3 rotate([Const, Ref] btVector3 wAxis, [Const] float angle);
91
+ float dot([Ref] btVector3 v);
92
+ float angle([Const, Ref] btVector3 v);
93
+ [Value] btVector3 absolute();
94
+ [Value] btVector3 cross([Const, Ref] btVector3 v);
95
+ float triple([Const, Ref] btVector3 v1, [Const, Ref] btVector3 v2);
96
+ long minAxis();
97
+ long maxAxis();
98
+ long furthestAxis();
99
+ long closestAxis();
100
+ void setInterpolate3([Const, Ref] btVector3 v0, [Const, Ref] btVector3 v1, float rt);
101
+ // [Value] btVector3 lerp([Const, Ref] btVector3 v, [Const, Ref] float t);
102
+ [Operator="*=", Ref] btVector3 op_mul(float x);
103
+ [Operator="+=", Ref] btVector3 op_add([Ref] btVector3 v);
104
+ [Operator="-=", Ref] btVector3 op_sub([Ref] btVector3 v);
105
+ };
106
+ // //btVector4 implements btVector3;
107
+
108
+ interface btQuadWord {
109
+ float x();
110
+ float y();
111
+ float z();
112
+ float w();
113
+ void setX(float x);
114
+ void setY(float y);
115
+ void setZ(float z);
116
+ void setW(float w);
117
+ };
118
+
119
+ interface btQuaternion {
120
+ void btQuaternion();
121
+ // void btQuaternion([Const, Ref] btQuaternion q);
122
+ void btQuaternion(float x, float y, float z, float w);
123
+ void setValue(float x, float y, float z, float w);
124
+ void setEulerZYX(float z, float y, float x);
125
+ void setRotation([Ref] btVector3 axis, float angle);
126
+ void normalize();
127
+ float length2();
128
+ float length();
129
+ float dot([Ref] btQuaternion q);
130
+ [Value] btQuaternion normalized();
131
+ [Value] btVector3 getAxis();
132
+ [Value] btQuaternion inverse();
133
+ float getAngle();
134
+ float getAngleShortestPath();
135
+ float angle([Ref] btQuaternion q);
136
+ float angleShortestPath([Ref] btQuaternion q);
137
+ [Operator="+=", Ref] btQuaternion op_add([Ref] btQuaternion q);
138
+ [Operator="-=", Ref] btQuaternion op_sub([Ref] btQuaternion q);
139
+ [Operator="*=", Ref] btQuaternion op_mul(float s);
140
+ [Operator="*=", Ref] btQuaternion op_mulq([Ref] btQuaternion q);
141
+ [Operator="/=", Ref] btQuaternion op_div(float s);
142
+ };
143
+ btQuaternion implements btQuadWord;
144
+
145
+ interface btMatrix3x3 {
146
+ void setEulerZYX(float ex, float ey, float ez);
147
+ void getRotation([Ref] btQuaternion q);
148
+ [Value] btVector3 getRow(long y);
149
+ };
150
+
151
+ interface btTransform {
152
+ void btTransform();
153
+ void btTransform([Ref] btQuaternion q, [Ref] btVector3 v);
154
+
155
+ void setIdentity();
156
+ void setOrigin([Ref] btVector3 origin);
157
+ void setRotation([Ref] btQuaternion rotation);
158
+ [Ref] btVector3 getOrigin();
159
+ [Value] btQuaternion getRotation();
160
+ [Ref] btMatrix3x3 getBasis();
161
+ void setFromOpenGLMatrix(float[] m);
162
+ [Value] btTransform inverse();
163
+ [Operator="*=", Ref] btTransform op_mul([Ref] btTransform t);
164
+ };
165
+
166
+ interface btMotionState {
167
+ void getWorldTransform([Ref] btTransform worldTrans);
168
+ void setWorldTransform([Ref] btTransform worldTrans);
169
+ };
170
+
171
+ [JSImplementation="btMotionState"]
172
+ interface MotionState {
173
+ void MotionState();
174
+ [Const] void getWorldTransform([Ref] btTransform worldTrans);
175
+ void setWorldTransform([Const, Ref] btTransform worldTrans);
176
+ };
177
+
178
+ interface btDefaultMotionState {
179
+ void btDefaultMotionState([Ref] optional btTransform startTrans, [Ref] optional btTransform centerOfMassOffset);
180
+ [Value] attribute btTransform m_graphicsWorldTrans;
181
+ };
182
+ btDefaultMotionState implements btMotionState;
183
+
184
+ interface btSpatialForceVector {
185
+ [Value] attribute btVector3 m_topVec;
186
+ [Value] attribute btVector3 m_bottomVec;
187
+ //
188
+ void btSpatialForceVector();
189
+ void btSpatialForceVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
190
+ // void btSpatialForceVector([Const, Ref] float ax, [Const, Ref] float ay, [Const, Ref] float az, [Const, Ref] float lx, [Const, Ref] float ly, [Const, Ref] float lz);
191
+ //
192
+ void setVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
193
+ // void setValue([Const, Ref] float ax, [Const, Ref] float ay, [Const, Ref] float az, [Const, Ref] float lx, [Const, Ref] float ly, [Const, Ref] float lz);
194
+ //
195
+ void addVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
196
+ // void addValue([Const, Ref] float ax, [Const, Ref] float ay, [Const, Ref] float az, [Const, Ref] float lx, [Const, Ref] float ly, [Const, Ref] float lz);
197
+ //
198
+ [Const, Ref] btVector3 getLinear();
199
+ [Const, Ref] btVector3 getAngular();
200
+ //
201
+ void setLinear([Const, Ref] btVector3 linear);
202
+ void setAngular([Const, Ref] btVector3 angular);
203
+ //
204
+ void addAngular([Const, Ref] btVector3 angular);
205
+ void addLinear([Const, Ref] btVector3 linear);
206
+ //
207
+ void setZero();
208
+ //
209
+ [Operator="+=", Ref] btSpatialForceVector op_add([Const, Ref] btSpatialForceVector vec);
210
+ [Operator="-=", Ref] btSpatialForceVector op_sub([Const, Ref] btSpatialForceVector vec);
211
+ };
212
+
213
+ interface btSpatialMotionVector
214
+ {
215
+ [Value] attribute btVector3 m_topVec;
216
+ [Value] attribute btVector3 m_bottomVec;
217
+
218
+ void btSpatialMotionVector();
219
+ void btSpatialMotionVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
220
+
221
+ void setVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
222
+ // void setValue([Const, Ref] float ax, [Const, Ref] float ay, [Const, Ref] float az, [Const, Ref] float lx, [Const, Ref] float ly, [Const, Ref] float lz);
223
+ void addVector([Const, Ref] btVector3 angular, [Const, Ref] btVector3 linear);
224
+ // void addValue([Const, Ref] float ax, [Const, Ref] float ay, [Const, Ref] float az, [Const, Ref] float lx, [Const, Ref] float ly, [Const, Ref] float lz);
225
+
226
+ [Const, Ref] btVector3 getAngular();
227
+ [Const, Ref] btVector3 getLinear();
228
+
229
+ void setAngular([Const, Ref] btVector3 angular);
230
+ void setLinear([Const, Ref] btVector3 linear);
231
+
232
+ void addAngular([Const, Ref] btVector3 angular);
233
+ void addLinear([Const, Ref] btVector3 linear);
234
+
235
+ void setZero();
236
+ float dot([Const, Ref] btSpatialForceVector b);
237
+
238
+ [Operator="+=", Ref] btSpatialMotionVector op_add([Const, Ref] btSpatialMotionVector vec);
239
+ [Operator="-=", Ref] btSpatialMotionVector op_sub([Const, Ref] btSpatialMotionVector vec);
240
+ // [Operator="*=", Ref] btSpatialMotionVector op_mul([Const, Ref] float s);
241
+ };
242
+
243
+ interface btSymmetricSpatialDyad {
244
+ [Value] attribute btMatrix3x3 m_topLeftMat;
245
+ [Value] attribute btMatrix3x3 m_topRightMat;
246
+ [Value] attribute btMatrix3x3 m_bottomLeftMat;
247
+ void btSymmetricSpatialDyad();
248
+ void btSymmetricSpatialDyad([Const, Ref] btMatrix3x3 topLeftMat, [Const, Ref] btMatrix3x3 topRightMat, [Const, Ref] btMatrix3x3 bottomLeftMat);
249
+ void setMatrix([Const, Ref] btMatrix3x3 topLeftMat, [Const, Ref] btMatrix3x3 topRightMat, [Const, Ref] btMatrix3x3 bottomLeftMat);
250
+ void addMatrix([Const, Ref] btMatrix3x3 topLeftMat, [Const, Ref] btMatrix3x3 topRightMat, [Const, Ref] btMatrix3x3 bottomLeftMat);
251
+ void setIdentity();
252
+ [Operator="-=", Ref] btSymmetricSpatialDyad op_sub([Const, Ref] btSymmetricSpatialDyad mat);
253
+ };
254
+
255
+ // Collision
256
+
257
+ enum btCollisionObject_CollisionFlags {
258
+ "btCollisionObject::CF_DYNAMIC_OBJECT",
259
+ "btCollisionObject::CF_STATIC_OBJECT",
260
+ "btCollisionObject::CF_KINEMATIC_OBJECT",
261
+ "btCollisionObject::CF_NO_CONTACT_RESPONSE",
262
+ "btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK", //this allows per-triangle material (friction/restitution)
263
+ "btCollisionObject::CF_CHARACTER_OBJECT",
264
+ "btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT", //disable debug drawing
265
+ "btCollisionObject::CF_DISABLE_SPU_COLLISION_PROCESSING", //disable parallel/SPU processing
266
+ "btCollisionObject::CF_HAS_CONTACT_STIFFNESS_DAMPING",
267
+ "btCollisionObject::CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR",
268
+ "btCollisionObject::CF_HAS_FRICTION_ANCHOR",
269
+ "btCollisionObject::CF_HAS_COLLISION_SOUND_TRIGGER"
270
+ };
271
+
272
+ enum btCollisionObject_CollisionObjectTypes {
273
+ "btCollisionObject::CO_COLLISION_OBJECT",
274
+ "btCollisionObject::CO_RIGID_BODY",
275
+ "btCollisionObject::CO_GHOST_OBJECT",
276
+ "btCollisionObject::CO_SOFT_BODY",
277
+ "btCollisionObject::CO_HF_FLUID",
278
+ "btCollisionObject::CO_USER_TYPE",
279
+ "btCollisionObject::CO_FEATHERSTONE_LINK"
280
+ };
281
+
282
+ enum btCollisionObject_AnisotropicFrictionFlags {
283
+ "btCollisionObject::CF_ANISOTROPIC_FRICTION_DISABLED",
284
+ "btCollisionObject::CF_ANISOTROPIC_FRICTION",
285
+ "btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION"
286
+ };
287
+
288
+ interface btCollisionObject {
289
+ [Const, Ref] btVector3 getAnisotropicFriction();
290
+ void setAnisotropicFriction([Const, Ref] btVector3 anisotropicFriction, long frictionMode);
291
+ boolean hasAnisotropicFriction(optional long frictionMode);
292
+ btCollisionShape getCollisionShape();
293
+ float getContactProcessingThreshold();
294
+ void setContactProcessingThreshold(float contactProcessingThreshold);
295
+ long getActivationState();
296
+ void setActivationState(long newState);
297
+ void forceActivationState(long newState);
298
+ void activate(optional boolean forceActivation);
299
+ void setDeactivationTime(float time);
300
+ float getDeactivationTime();
301
+ boolean isActive();
302
+ boolean isKinematicObject();
303
+ boolean isStaticObject();
304
+ boolean isStaticOrKinematicObject();
305
+ [Const] float getRestitution();
306
+ [Const] float getFriction();
307
+ [Const] float getRollingFriction();
308
+ float getSpinningFriction();
309
+ float getContactStiffness();
310
+ float getContactDamping();
311
+ void setRestitution(float rest);
312
+ void setFriction(float frict);
313
+ void setRollingFriction(float frict);
314
+ void setSpinningFriction(float frict);
315
+ void setContactStiffnessAndDamping(float stiffness, float damping);
316
+ [Ref] btTransform getWorldTransform();
317
+ long getCollisionFlags();
318
+ void setCollisionFlags(long flags);
319
+ void setWorldTransform([Const, Ref] btTransform worldTrans);
320
+ void setCollisionShape(btCollisionShape collisionShape);
321
+ void setCcdMotionThreshold (float ccdMotionThreshold);
322
+ void setCcdSweptSphereRadius (float radius);
323
+ long getUserIndex();
324
+ long getUserIndex2();
325
+ long getUserIndex3();
326
+ void setUserIndex(long index);
327
+ void setUserIndex2(long index);
328
+ void setUserIndex3(long index);
329
+ VoidPtr getUserPointer();
330
+ void setUserPointer(VoidPtr userPointer);
331
+ [Const] btBroadphaseProxy getBroadphaseHandle();
332
+ };
333
+
334
+ [NoDelete]
335
+ interface btCollisionObjectWrapper {
336
+ [Const, Ref] btTransform getWorldTransform();
337
+ [Const] btCollisionObject getCollisionObject();
338
+ [Const] btCollisionShape getCollisionShape();
339
+ };
340
+
341
+ [Prefix="btCollisionWorld::"]
342
+ interface RayResultCallback {
343
+ // abstract base class, no constructor
344
+ boolean hasHit();
345
+ attribute long m_collisionFilterGroup;
346
+ attribute long m_collisionFilterMask;
347
+ attribute float m_closestHitFraction;
348
+ [Const] attribute btCollisionObject m_collisionObject;
349
+ attribute unsigned long m_flags;
350
+ };
351
+
352
+ [Prefix="btCollisionWorld::"]
353
+ interface ClosestRayResultCallback {
354
+ void ClosestRayResultCallback([Const, Ref] btVector3 from, [Const, Ref] btVector3 to);
355
+
356
+ [Value] attribute btVector3 m_rayFromWorld;
357
+ [Value] attribute btVector3 m_rayToWorld;
358
+ [Value] attribute btVector3 m_hitNormalWorld;
359
+ [Value] attribute btVector3 m_hitPointWorld;
360
+ };
361
+ ClosestRayResultCallback implements RayResultCallback;
362
+
363
+ interface btConstCollisionObjectArray {
364
+ long size();
365
+ [Const] btCollisionObject at(long n);
366
+ };
367
+
368
+ interface btScalarArray {
369
+ long size();
370
+ float at(long n);
371
+ };
372
+
373
+ [Prefix="btCollisionWorld::"]
374
+ interface AllHitsRayResultCallback {
375
+ void AllHitsRayResultCallback([Const, Ref] btVector3 from, [Const, Ref] btVector3 to);
376
+
377
+ [Value] attribute btConstCollisionObjectArray m_collisionObjects;
378
+ [Value] attribute btVector3 m_rayFromWorld;
379
+ [Value] attribute btVector3 m_rayToWorld;
380
+ [Value] attribute btVector3Array m_hitNormalWorld;
381
+ [Value] attribute btVector3Array m_hitPointWorld;
382
+ [Value] attribute btScalarArray m_hitFractions;
383
+ };
384
+ AllHitsRayResultCallback implements RayResultCallback;
385
+
386
+ interface btManifoldPoint {
387
+ [Const, Ref] btVector3 getPositionWorldOnA();
388
+ [Const, Ref] btVector3 getPositionWorldOnB();
389
+ [Const] double getAppliedImpulse();
390
+ [Const] double getDistance();
391
+ [Value] attribute btVector3 m_localPointA;
392
+ [Value] attribute btVector3 m_localPointB;
393
+ [Value] attribute btVector3 m_positionWorldOnB;
394
+ [Value] attribute btVector3 m_positionWorldOnA;
395
+ [Value] attribute btVector3 m_normalWorldOnB;
396
+
397
+ // Contact callback support
398
+ attribute any m_userPersistentData;
399
+ };
400
+
401
+ [Prefix="btCollisionWorld::"]
402
+ interface ContactResultCallback {
403
+ float addSingleResult([Ref] btManifoldPoint cp, [Const] btCollisionObjectWrapper colObj0Wrap, long partId0, long index0, [Const] btCollisionObjectWrapper colObj1Wrap, long partId1, long index1);
404
+ };
405
+
406
+ [JSImplementation="ContactResultCallback"]
407
+ interface ConcreteContactResultCallback {
408
+ void ConcreteContactResultCallback();
409
+ float addSingleResult([Ref] btManifoldPoint cp, [Const] btCollisionObjectWrapper colObj0Wrap, long partId0, long index0, [Const] btCollisionObjectWrapper colObj1Wrap, long partId1, long index1);
410
+ };
411
+
412
+ [Prefix="btCollisionWorld::"]
413
+ interface LocalShapeInfo {
414
+ attribute long m_shapePart;
415
+ attribute long m_triangleIndex;
416
+ };
417
+
418
+ [Prefix="btCollisionWorld::"]
419
+ interface LocalConvexResult {
420
+ void LocalConvexResult([Const] btCollisionObject hitCollisionObject, LocalShapeInfo localShapeInfo, [Const, Ref] btVector3 hitNormalLocal, [Const, Ref] btVector3 hitPointLocal, float hitFraction);
421
+ [Const] attribute btCollisionObject m_hitCollisionObject;
422
+ attribute LocalShapeInfo m_localShapeInfo;
423
+ [Value] attribute btVector3 m_hitNormalLocal;
424
+ [Value] attribute btVector3 m_hitPointLocal;
425
+ attribute float m_hitFraction;
426
+ };
427
+
428
+ [Prefix="btCollisionWorld::"]
429
+ interface ConvexResultCallback {
430
+ // abstract base class, no constructor
431
+ boolean hasHit();
432
+ attribute short m_collisionFilterGroup;
433
+ attribute short m_collisionFilterMask;
434
+ attribute float m_closestHitFraction;
435
+ };
436
+
437
+ [Prefix="btCollisionWorld::"]
438
+ interface ClosestConvexResultCallback {
439
+ void ClosestConvexResultCallback([Const, Ref] btVector3 convexFromWorld, [Const, Ref] btVector3 convexToWorld);
440
+ [Const] attribute btCollisionObject m_hitCollisionObject;
441
+ [Value] attribute btVector3 m_convexFromWorld;
442
+ [Value] attribute btVector3 m_convexToWorld;
443
+ [Value] attribute btVector3 m_hitNormalWorld;
444
+ [Value] attribute btVector3 m_hitPointWorld;
445
+ };
446
+ ClosestConvexResultCallback implements ConvexResultCallback;
447
+
448
+ interface btCollisionShape {
449
+ void setLocalScaling([Const, Ref] btVector3 scaling);
450
+ [Const, Ref] btVector3 getLocalScaling();
451
+ void calculateLocalInertia(float mass, [Ref] btVector3 inertia);
452
+ void setMargin(float margin);
453
+ float getMargin();
454
+ };
455
+
456
+ interface btConvexShape {
457
+ };
458
+ btConvexShape implements btCollisionShape;
459
+
460
+ interface btConvexTriangleMeshShape {
461
+ void btConvexTriangleMeshShape(btStridingMeshInterface meshInterface, optional boolean calcAabb);
462
+ };
463
+ btConvexTriangleMeshShape implements btConvexShape;
464
+
465
+ interface btBoxShape {
466
+ void btBoxShape([Ref] btVector3 boxHalfExtents);
467
+ void setMargin(float margin);
468
+ float getMargin();
469
+ };
470
+ btBoxShape implements btCollisionShape;
471
+
472
+ interface btCapsuleShape {
473
+ void btCapsuleShape(float radius, float height);
474
+ void setMargin(float margin);
475
+ float getMargin();
476
+ long getUpAxis();
477
+ float getRadius();
478
+ float getHalfHeight();
479
+ };
480
+ btCapsuleShape implements btCollisionShape;
481
+
482
+ interface btCapsuleShapeX {
483
+ void btCapsuleShapeX(float radius, float height);
484
+ void setMargin(float margin);
485
+ float getMargin();
486
+ };
487
+ btCapsuleShapeX implements btCapsuleShape;
488
+
489
+ interface btCapsuleShapeZ {
490
+ void btCapsuleShapeZ(float radius, float height);
491
+ void setMargin(float margin);
492
+ float getMargin();
493
+ };
494
+ btCapsuleShapeZ implements btCapsuleShape;
495
+
496
+ interface btCylinderShape {
497
+ void btCylinderShape([Ref] btVector3 halfExtents);
498
+ void setMargin(float margin);
499
+ float getMargin();
500
+ };
501
+ btCylinderShape implements btCollisionShape;
502
+
503
+ interface btCylinderShapeX {
504
+ void btCylinderShapeX([Ref] btVector3 halfExtents);
505
+ void setMargin(float margin);
506
+ float getMargin();
507
+ };
508
+ btCylinderShapeX implements btCylinderShape;
509
+
510
+ interface btCylinderShapeZ {
511
+ void btCylinderShapeZ([Ref] btVector3 halfExtents);
512
+ void setMargin(float margin);
513
+ float getMargin();
514
+ };
515
+ btCylinderShapeZ implements btCylinderShape;
516
+
517
+ interface btSphereShape {
518
+ void btSphereShape(float radius);
519
+ void setMargin(float margin);
520
+ float getMargin();
521
+ };
522
+ btSphereShape implements btCollisionShape;
523
+
524
+ interface btMultiSphereShape {
525
+ void btMultiSphereShape([Const] btVector3 positions, [Const] float[] radii, long numPoints);
526
+ };
527
+ btMultiSphereShape implements btCollisionShape;
528
+
529
+ interface btConeShape {
530
+ void btConeShape(float radius, float height);
531
+ };
532
+ btConeShape implements btCollisionShape;
533
+
534
+ interface btConeShapeX {
535
+ void btConeShapeX(float radius, float height);
536
+ };
537
+ btConeShapeX implements btConeShape;
538
+
539
+ interface btConeShapeZ {
540
+ void btConeShapeZ(float radius, float height);
541
+ };
542
+ btConeShapeZ implements btConeShape;
543
+
544
+ interface btIntArray {
545
+ long size();
546
+ long at(long n);
547
+ };
548
+
549
+ interface btFace {
550
+ [Value] attribute btIntArray m_indices;
551
+ attribute float[] m_plane;
552
+ };
553
+
554
+ interface btVector3Array {
555
+ void btVector3Array();
556
+ long size();
557
+ [Const, Ref] btVector3 at(long n);
558
+ void clear();
559
+ void pop_back();
560
+ void resize(long newsize, [Const, Ref] btVector3? fillData);
561
+ [Ref] btVector3 expandNonInitializing();
562
+ [Ref] btVector3 expand([Const, Ref] btVector3? fillValue);
563
+ void push_back([Const, Ref] btVector3 _Val);
564
+ long capacity();
565
+ void reserve(long _Count);
566
+ };
567
+
568
+ interface btQuaternionArray {
569
+ void btQuaternionArray();
570
+ long size();
571
+ [Const, Ref] btQuaternion at(long n);
572
+ void clear();
573
+ void pop_back();
574
+ void resize(long newsize, [Const, Ref] btQuaternion? fillData);
575
+ [Ref] btQuaternion expandNonInitializing();
576
+ [Ref] btQuaternion expand([Const, Ref] btQuaternion? fillValue);
577
+ void push_back([Const, Ref] btQuaternion _Val);
578
+ long capacity();
579
+ void reserve(long _Count);
580
+ };
581
+
582
+ interface btMatrix3x3Array {
583
+ void btMatrix3x3Array();
584
+ long size();
585
+ [Const, Ref] btMatrix3x3 at(long n);
586
+ void clear();
587
+ void pop_back();
588
+ void resize(long newsize, [Const, Ref] btMatrix3x3? fillData);
589
+ [Ref] btMatrix3x3 expandNonInitializing();
590
+ [Ref] btMatrix3x3 expand([Const, Ref] btMatrix3x3? fillValue);
591
+ void push_back([Const, Ref] btMatrix3x3 _Val);
592
+ long capacity();
593
+ void reserve(long _Count);
594
+ };
595
+
596
+ interface btFaceArray {
597
+ void btFaceArray();
598
+ long size();
599
+ [Const, Ref] btFace at(long n);
600
+ void clear();
601
+ void pop_back();
602
+ void resize(long newsize, [Const, Ref] btFace? fillData);
603
+ [Ref] btFace expandNonInitializing();
604
+ [Ref] btFace expand([Const, Ref] btFace? fillValue);
605
+ void push_back([Const, Ref] btFace _Val);
606
+ long capacity();
607
+ void reserve(long _Count);
608
+ };
609
+
610
+ interface btConvexPolyhedron {
611
+ [Value] attribute btVector3Array m_vertices;
612
+ [Value] attribute btFaceArray m_faces;
613
+ };
614
+
615
+ interface btConvexHullShape {
616
+ void btConvexHullShape([Const] optional float[] points, optional long numPoints);
617
+ void addPoint([Const, Ref] btVector3 point, optional boolean recalculateLocalAABB);
618
+ void setMargin(float margin);
619
+ float getMargin();
620
+ long getNumVertices();
621
+ boolean initializePolyhedralFeatures(long shiftVerticesByMargin);
622
+ void recalcLocalAabb();
623
+ [Const] btConvexPolyhedron getConvexPolyhedron();
624
+ };
625
+ btConvexHullShape implements btCollisionShape;
626
+
627
+ interface btShapeHull {
628
+ void btShapeHull(btConvexShape shape);
629
+ boolean buildHull(float margin);
630
+ long numVertices();
631
+ [Const] btVector3 getVertexPointer();
632
+ };
633
+
634
+ interface btCompoundShape {
635
+ void btCompoundShape(optional boolean enableDynamicAabbTree);
636
+ void addChildShape([Const, Ref] btTransform localTransform, btCollisionShape shape);
637
+ void removeChildShape(btCollisionShape shape);
638
+ void removeChildShapeByIndex(long childShapeindex);
639
+ [Const] long getNumChildShapes();
640
+ btCollisionShape getChildShape(long index);
641
+ void updateChildTransform(long childIndex, [Const, Ref] btTransform newChildTransform, optional boolean shouldRecalculateLocalAabb);
642
+ void setMargin(float margin);
643
+ float getMargin();
644
+ };
645
+ btCompoundShape implements btCollisionShape;
646
+
647
+ interface btStridingMeshInterface {
648
+ void setScaling([Const, Ref] btVector3 scaling);
649
+ };
650
+
651
+ interface btIndexedMesh {
652
+ attribute long m_numTriangles;
653
+ };
654
+
655
+ interface btIndexedMeshArray {
656
+ long size();
657
+ [Const, Ref] btIndexedMesh at(long n);
658
+ };
659
+
660
+ interface btTriangleMesh {
661
+ void btTriangleMesh(optional boolean use32bitIndices, optional boolean use4componentVertices);
662
+ void addTriangle([Const, Ref] btVector3 vertex0, [Const, Ref] btVector3 vertex1, [Const, Ref] btVector3 vertex2, optional boolean removeDuplicateVertices);
663
+ void addTriangleIndices(long index1, long index2, long index3);
664
+ long findOrAddVertex([Const, Ref] btVector3 vertex, boolean removeDuplicateVertices);
665
+ void addIndex(long index);
666
+ [Ref] btIndexedMeshArray getIndexedMeshArray();
667
+ };
668
+ btTriangleMesh implements btStridingMeshInterface;
669
+
670
+ enum PHY_ScalarType {
671
+ "PHY_FLOAT",
672
+ "PHY_DOUBLE",
673
+ "PHY_INTEGER",
674
+ "PHY_SHORT",
675
+ "PHY_FIXEDPOINT88",
676
+ "PHY_UCHAR"
677
+ };
678
+
679
+ interface btTriangleCallback {
680
+ void processTriangle(btVector3 triangle, long partId, long triangleIndex);
681
+ };
682
+
683
+ [JSImplementation="btTriangleCallback"]
684
+ interface btTriangleCallback_implJS {
685
+ void processTriangle(btVector3 triangle, long partId, long triangleIndex);
686
+ };
687
+
688
+ interface btConcaveShape {
689
+ };
690
+ btConcaveShape implements btCollisionShape;
691
+
692
+ interface btEmptyShape {
693
+ void btEmptyShape();
694
+ };
695
+ btEmptyShape implements btConcaveShape;
696
+
697
+ interface btStaticPlaneShape {
698
+ void btStaticPlaneShape([Const, Ref] btVector3 planeNormal, float planeConstant);
699
+ };
700
+ btStaticPlaneShape implements btConcaveShape;
701
+
702
+ interface btTriangleMeshShape {
703
+ };
704
+ btTriangleMeshShape implements btConcaveShape;
705
+
706
+ interface btBvhTriangleMeshShape {
707
+ void btBvhTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, optional boolean buildBvh);
708
+
709
+ void performRaycast(btTriangleCallback callback, [Const, Ref] btVector3 raySource, [Const, Ref] btVector3 rayTarget);
710
+ };
711
+ btBvhTriangleMeshShape implements btTriangleMeshShape;
712
+
713
+ interface btHeightfieldTerrainShape {
714
+ void btHeightfieldTerrainShape(long heightStickWidth, long heightStickLength, VoidPtr heightfieldData, float heightScale, float minHeight, float maxHeight, long upAxis, PHY_ScalarType hdt, boolean flipQuadEdges);
715
+ void setMargin(float margin);
716
+ float getMargin();
717
+ };
718
+ btHeightfieldTerrainShape implements btConcaveShape;
719
+
720
+ // GImpact
721
+
722
+ interface btAABB {
723
+ void btAABB([ Const, Ref ] btVector3 V1, [ Const, Ref ] btVector3 V2, [ Const, Ref ] btVector3 V3, float margin);
724
+ void invalidate();
725
+ void increment_margin(float margin);
726
+ void copy_with_margin([ Const, Ref ] btAABB other, float margin);
727
+ };
728
+
729
+ interface btPrimitiveTriangle {
730
+ void btPrimitiveTriangle();
731
+ };
732
+
733
+ interface btTriangleShapeEx {
734
+ void btTriangleShapeEx([ Const, Ref ] btVector3 p1, [ Const, Ref ] btVector3 p2, [ Const, Ref ] btVector3 p3);
735
+ void getAabb([ Const, Ref ] btTransform t, [ Ref ] btVector3 aabbMin, [ Ref ] btVector3 aabbMax);
736
+ void applyTransform([ Const, Ref ] btTransform t);
737
+ // void buildTriPlane([ Ref ] btVector4 plane);
738
+ };
739
+
740
+ interface btPrimitiveManagerBase {
741
+ boolean is_trimesh();
742
+ long get_primitive_count();
743
+ void get_primitive_box(long prim_index , [Ref] btAABB primbox);
744
+ void get_primitive_triangle(long prim_index, [Ref] btPrimitiveTriangle triangle);
745
+ };
746
+
747
+ enum eGIMPACT_SHAPE_TYPE {
748
+ "CONST_GIMPACT_COMPOUND_SHAPE",
749
+ "CONST_GIMPACT_TRIMESH_SHAPE_PART",
750
+ "CONST_GIMPACT_TRIMESH_SHAPE"
751
+ };
752
+
753
+ interface btTetrahedronShapeEx {
754
+ void btTetrahedronShapeEx();
755
+ void setVertices([ Const, Ref ] btVector3 v0, [ Const, Ref ] btVector3 v1, [ Const, Ref ] btVector3 v2, [ Const, Ref ] btVector3 v3);
756
+ };
757
+
758
+ interface btGImpactShapeInterface {
759
+ void updateBound();
760
+ void postUpdate();
761
+ long getShapeType();
762
+ [Const] DOMString getName();
763
+ eGIMPACT_SHAPE_TYPE getGImpactShapeType();
764
+ [Const] btPrimitiveManagerBase getPrimitiveManager();
765
+ long getNumChildShapes();
766
+ boolean childrenHasTransform();
767
+ boolean needsRetrieveTriangles();
768
+ boolean needsRetrieveTetrahedrons();
769
+ void getBulletTriangle(long prim_index, [Ref] btTriangleShapeEx triangle);
770
+ void getBulletTetrahedron(long prim_index, [Ref] btTetrahedronShapeEx tetrahedron);
771
+ [Const] btCollisionShape getChildShape(long index);
772
+ [Value] btTransform getChildTransform(long index);
773
+ void setChildTransform(long index, [Const, Ref] btTransform transform);
774
+ };
775
+ btGImpactShapeInterface implements btConcaveShape;
776
+
777
+ [Prefix="btGImpactCompoundShape::"]
778
+ interface CompoundPrimitiveManager {
779
+ attribute btGImpactCompoundShape m_compoundShape;
780
+ long get_primitive_count();
781
+ void get_primitive_box(long prim_index, [Ref] btAABB primbox);
782
+ void get_primitive_triangle(long prim_index, [Ref] btPrimitiveTriangle triangle);
783
+ };
784
+ CompoundPrimitiveManager implements btPrimitiveManagerBase;
785
+
786
+ interface btGImpactCompoundShape {
787
+ void btGImpactCompoundShape(optional boolean children_has_transform = true);
788
+ boolean childrenHasTransform();
789
+ [Const] btPrimitiveManagerBase getPrimitiveManager();
790
+ CompoundPrimitiveManager getCompoundPrimitiveManager();
791
+ long getNumChildShapes();
792
+ void addChildShape([ Const, Ref ] btTransform localTransform, btCollisionShape shape);
793
+ btCollisionShape getChildShape(long index);
794
+ void getChildAabb(long child_index, [ Const, Ref ] btTransform t, [Ref] btVector3 aabbMin, [Ref] btVector3 aabbMax);
795
+ [Value] btTransform getChildTransform(long index);
796
+ void setChildTransform(long index, [ Const, Ref ] btTransform transform);
797
+ void calculateLocalInertia(float mass, [Ref] btVector3 inertia);
798
+ [Const] DOMString getName();
799
+ eGIMPACT_SHAPE_TYPE getGImpactShapeType();
800
+ };
801
+ btGImpactCompoundShape implements btGImpactShapeInterface;
802
+
803
+ [Prefix = "btGImpactMeshShapePart::"]
804
+ interface TrimeshPrimitiveManager {
805
+ attribute float m_margin;
806
+ attribute btStridingMeshInterface m_meshInterface;
807
+ attribute long m_part;
808
+ attribute long m_lock_count;
809
+ attribute long numverts;
810
+ attribute PHY_ScalarType type;
811
+ attribute long stride;
812
+ attribute long indexstride;
813
+ attribute long numfaces;
814
+ attribute PHY_ScalarType indicestype;
815
+ void TrimeshPrimitiveManager([Const, Ref] optional TrimeshPrimitiveManager manager);
816
+ void lock();
817
+ void unlock();
818
+ boolean is_trimesh();
819
+ long get_vertex_count();
820
+ void get_indices(long face_index, unsigned long i0, unsigned long i1, unsigned long i2);
821
+ void get_vertex(unsigned long vertex_index, [Ref] btVector3 vertex);
822
+ void get_bullet_triangle(long prim_index, [Ref] btTriangleShapeEx triangle);
823
+ };
824
+ TrimeshPrimitiveManager implements btPrimitiveManagerBase;
825
+
826
+ interface btGImpactMeshShapePart {
827
+ void btGImpactMeshShapePart(btStridingMeshInterface meshInterface, long part);
828
+ TrimeshPrimitiveManager getTrimeshPrimitiveManager();
829
+ long getVertexCount();
830
+ void getVertex(long vertex_index, [Ref] btVector3 vertex);
831
+ long getPart();
832
+ };
833
+ btGImpactMeshShapePart implements btGImpactShapeInterface;
834
+
835
+ interface btGImpactMeshShape {
836
+ void btGImpactMeshShape(btStridingMeshInterface meshInterface);
837
+ [Const] btStridingMeshInterface getMeshInterface();
838
+ long getMeshPartCount();
839
+ [Const] btGImpactMeshShapePart getMeshPart(long index);
840
+ long calculateSerializeBufferSize();
841
+ };
842
+ btGImpactMeshShape implements btGImpactShapeInterface;
843
+
844
+ interface btCollisionAlgorithmConstructionInfo {
845
+ void btCollisionAlgorithmConstructionInfo();
846
+ void btCollisionAlgorithmConstructionInfo(btDispatcher dispatcher, long temp);
847
+ attribute btDispatcher m_dispatcher1;
848
+ attribute btPersistentManifold m_manifold;
849
+ };
850
+
851
+ interface btCollisionAlgorithm {
852
+ };
853
+
854
+ interface btActivatingCollisionAlgorithm {
855
+ };
856
+ btActivatingCollisionAlgorithm implements btCollisionAlgorithm;
857
+
858
+ interface btGImpactCollisionAlgorithm {
859
+ void btGImpactCollisionAlgorithm([Const, Ref] btCollisionAlgorithmConstructionInfo ci, [Const] btCollisionObjectWrapper body0Wrap, [Const] btCollisionObjectWrapper body1Wrap);
860
+ static void registerAlgorithm(btCollisionDispatcher dispatcher);
861
+ };
862
+ btGImpactCollisionAlgorithm implements btActivatingCollisionAlgorithm;
863
+
864
+ //
865
+
866
+ interface btDefaultCollisionConstructionInfo {
867
+ void btDefaultCollisionConstructionInfo();
868
+ };
869
+
870
+ interface btDefaultCollisionConfiguration {
871
+ void btDefaultCollisionConfiguration([Ref] optional btDefaultCollisionConstructionInfo info);
872
+ };
873
+
874
+ interface btPersistentManifold {
875
+ void btPersistentManifold();
876
+ [Const] btCollisionObject getBody0();
877
+ [Const] btCollisionObject getBody1();
878
+ long getNumContacts();
879
+ [Ref] btManifoldPoint getContactPoint(long index);
880
+ };
881
+
882
+ interface btDispatcher {
883
+ long getNumManifolds();
884
+ btPersistentManifold getManifoldByIndexInternal(long index);
885
+ };
886
+
887
+ interface btCollisionDispatcher {
888
+ void btCollisionDispatcher(btDefaultCollisionConfiguration conf);
889
+ };
890
+ btCollisionDispatcher implements btDispatcher;
891
+
892
+ interface btOverlappingPairCallback {
893
+ };
894
+
895
+ interface btOverlappingPairCache {
896
+ void setInternalGhostPairCallback(btOverlappingPairCallback ghostPairCallback);
897
+ [Const] float getNumOverlappingPairs();
898
+ };
899
+
900
+ interface btAxisSweep3 {
901
+ void btAxisSweep3([Ref] btVector3 worldAabbMin, [Ref] btVector3 worldAabbMax, optional long maxHandles, optional btOverlappingPairCache pairCache, optional boolean disableRaycastAccelerator);
902
+ };
903
+
904
+ interface btBroadphaseInterface {
905
+ btOverlappingPairCache getOverlappingPairCache();
906
+ };
907
+
908
+ interface btCollisionConfiguration {
909
+ };
910
+
911
+ interface btDbvtBroadphase {
912
+ void btDbvtBroadphase();
913
+ };
914
+ btDbvtBroadphase implements btBroadphaseInterface;
915
+
916
+ interface btBroadphaseProxy {
917
+ attribute long m_collisionFilterGroup;
918
+ attribute long m_collisionFilterMask;
919
+ };
920
+
921
+
922
+ // Dynamics
923
+
924
+ [Prefix="btRigidBody::"]
925
+ interface btRigidBodyConstructionInfo {
926
+ void btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape, [Ref] optional btVector3 localInertia);
927
+ attribute float m_linearDamping;
928
+ attribute float m_angularDamping;
929
+ attribute float m_friction;
930
+ attribute float m_rollingFriction;
931
+ attribute float m_restitution;
932
+ attribute float m_linearSleepingThreshold;
933
+ attribute float m_angularSleepingThreshold;
934
+ attribute boolean m_additionalDamping;
935
+ attribute float m_additionalDampingFactor;
936
+ attribute float m_additionalLinearDampingThresholdSqr;
937
+ attribute float m_additionalAngularDampingThresholdSqr;
938
+ attribute float m_additionalAngularDampingFactor;
939
+ };
940
+
941
+ interface btRigidBody {
942
+ void btRigidBody([Const, Ref] btRigidBodyConstructionInfo constructionInfo);
943
+
944
+ [Const, Ref] btTransform getCenterOfMassTransform();
945
+ void setCenterOfMassTransform([Const, Ref] btTransform xform);
946
+ void setSleepingThresholds(float linear, float angular);
947
+ float getLinearSleepingThreshold();
948
+ float getAngularSleepingThreshold();
949
+ [Const] float getLinearDamping();
950
+ [Const] float getAngularDamping();
951
+ void setDamping(float lin_damping, float ang_damping);
952
+ void applyDamping(float timeStep);
953
+ void setMassProps(float mass, [Const, Ref] btVector3 inertia);
954
+ float getInvMass();
955
+ float getMass();
956
+ [Const, Ref] btVector3 getLinearFactor();
957
+ void setLinearFactor([Const, Ref] btVector3 linearFactor);
958
+ void applyTorque([Const, Ref] btVector3 torque);
959
+ // void applyLocalTorque([Const, Ref] btVector3 torque);
960
+ void applyForce([Const, Ref] btVector3 force, [Const, Ref] btVector3 rel_pos);
961
+ // void applyCentralForce([Const, Ref] btVector3 force);
962
+ // void applyCentralLocalForce([Const, Ref] btVector3 force);
963
+ void applyCentralImpulse([Const, Ref] btVector3 impulse);
964
+ void applyTorqueImpulse([Const, Ref] btVector3 torque);
965
+ void applyImpulse([Const, Ref] btVector3 impulse, [Const, Ref] btVector3 rel_pos);
966
+ void applyPushImpulse([Const, Ref] btVector3 impulse, [Const, Ref] btVector3 rel_pos);
967
+ [Value] btVector3 getPushVelocity();
968
+ [Value] btVector3 getTurnVelocity();
969
+ void setPushVelocity([Const, Ref] btVector3 v);
970
+ void setTurnVelocity([Const, Ref] btVector3 v);
971
+ void applyCentralPushImpulse([Const, Ref] btVector3 impulse);
972
+ void applyTorqueTurnImpulse([Const, Ref] btVector3 torque);
973
+ [Const, Ref] btVector3 getCenterOfMassPosition();
974
+ [Value] btQuaternion getOrientation();
975
+ [Const, Ref] btVector3 getTotalForce();
976
+ [Const, Ref] btVector3 getTotalTorque();
977
+ [Const, Ref] btVector3 getInvInertiaDiagLocal();
978
+ void setInvInertiaDiagLocal([Const, Ref] btVector3 diagInvInertia);
979
+ void updateInertiaTensor();
980
+ [Const, Ref] btVector3 getLinearVelocity();
981
+ [Const, Ref] btVector3 getAngularVelocity();
982
+ void setLinearVelocity([Const, Ref] btVector3 lin_vel);
983
+ void setAngularVelocity([Const, Ref] btVector3 ang_vel);
984
+ [Value] btVector3 getVelocityInLocalPoint([Const, Ref] btVector3 rel_pos);
985
+ [Value] btVector3 getPushVelocityInLocalPoint([Const, Ref] btVector3 rel_pos);
986
+ void translate([Const, Ref] btVector3 v);
987
+ btMotionState getMotionState();
988
+ void setMotionState(btMotionState motionState);
989
+ [Const, Ref] btVector3 getAngularFactor();
990
+ void setAngularFactor([Const, Ref] btVector3 angularFactor);
991
+ btRigidBody upcast(btCollisionObject colObj);
992
+ void getAabb([Ref] btVector3 aabbMin, [Ref] btVector3 aabbMax);
993
+ void applyGravity();
994
+ void clearGravity();
995
+ [Const, Ref] btVector3 getGravity();
996
+ void setGravity([Const, Ref] btVector3 acceleration);
997
+ [Const] btBroadphaseProxy getBroadphaseProxy();
998
+ void clearForces();
999
+ void setFlags(long flags);
1000
+ [Const] long getFlags();
1001
+ };
1002
+ btRigidBody implements btCollisionObject;
1003
+
1004
+ interface btSolverBody {
1005
+ [Value] attribute btTransform m_worldTransform;
1006
+ [Value] attribute btVector3 m_deltaLinearVelocity;
1007
+ [Value] attribute btVector3 m_deltaAngularVelocity;
1008
+ [Value] attribute btVector3 m_angularFactor;
1009
+ [Value] attribute btVector3 m_linearFactor;
1010
+ [Value] attribute btVector3 m_invMass;
1011
+ [Value] attribute btVector3 m_pushVelocity;
1012
+ [Value] attribute btVector3 m_turnVelocity;
1013
+ [Value] attribute btVector3 m_linearVelocity;
1014
+ [Value] attribute btVector3 m_angularVelocity;
1015
+ [Value] attribute btVector3 m_externalForceImpulse;
1016
+ [Value] attribute btVector3 m_externalTorqueImpulse;
1017
+ attribute btRigidBody m_originalBody;
1018
+ void setWorldTransform([Const, Ref] btTransform worldTransform);
1019
+ [Const, Ref] btTransform getWorldTransform();
1020
+ void getVelocityInLocalPointNoDelta([Const, Ref] btVector3 rel_pos, [Ref] btVector3 velocity);
1021
+ void getVelocityInLocalPointObsolete([Const, Ref] btVector3 rel_pos, [Ref] btVector3 velocity);
1022
+ void getAngularVelocity([Ref] btVector3 angVel);
1023
+ //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position
1024
+ void applyImpulse([Const, Ref] btVector3 linearComponent, [Const, Ref] btVector3 angularComponent, [Const] float impulseMagnitude);
1025
+ void internalApplyPushImpulse([Const, Ref] btVector3 linearComponent, [Const, Ref] btVector3 angularComponent, float impulseMagnitude);
1026
+ [Const, Ref] btVector3 getDeltaLinearVelocity();
1027
+ [Const, Ref] btVector3 getDeltaAngularVelocity();
1028
+ [Const, Ref] btVector3 getPushVelocity();
1029
+ [Const, Ref] btVector3 getTurnVelocity();
1030
+ };
1031
+
1032
+ interface btSolverBodyArray {
1033
+ long size();
1034
+ [Const, Ref] btSolverBody at(long n);
1035
+ };
1036
+
1037
+ interface btConstraintSetting {
1038
+ void btConstraintSetting();
1039
+ attribute float m_tau;
1040
+ attribute float m_damping;
1041
+ attribute float m_impulseClamp;
1042
+ };
1043
+
1044
+ interface btJointFeedback {
1045
+ [Value] attribute btVector3 m_appliedForceBodyA;
1046
+ [Value] attribute btVector3 m_appliedTorqueBodyA;
1047
+ [Value] attribute btVector3 m_appliedForceBodyB;
1048
+ [Value] attribute btVector3 m_appliedTorqueBodyB;
1049
+ };
1050
+
1051
+ interface btTypedConstraint {
1052
+ long getOverrideNumSolverIterations();
1053
+ ///override the number of constraint solver iterations used to solve this constraint
1054
+ ///-1 will use the default number of iterations, as specified in SolverInfo.m_numIterations
1055
+ void setOverrideNumSolverIterations(long overideNumIterations);
1056
+
1057
+ void enableFeedback(boolean needsFeedback);
1058
+ boolean needsFeedback();
1059
+
1060
+ void setJointFeedback(btJointFeedback jointFeedback);
1061
+ [Const] btJointFeedback getJointFeedback();
1062
+
1063
+ ///getAppliedImpulse is an estimated total applied impulse.
1064
+ ///This feedback could be used to determine breaking constraints or playing sounds.
1065
+ float getAppliedImpulse();
1066
+
1067
+ btTypedConstraintType getConstraintType();
1068
+
1069
+ [Const] float getBreakingImpulseThreshold();
1070
+ void setBreakingImpulseThreshold([Const] float threshold);
1071
+ [Const] float getParam(long num, long axis);
1072
+ void setParam(long num, float value, long axis);
1073
+
1074
+ boolean isEnabled();
1075
+ void setEnabled(boolean enabled);
1076
+
1077
+
1078
+ [Const, Ref] btRigidBody getRigidBodyA();
1079
+ [Const, Ref] btRigidBody getRigidBodyB();
1080
+
1081
+ long getUserConstraintType();
1082
+ void setUserConstraintType(long userConstraintType);
1083
+
1084
+ [Ref] static btRigidBody getFixedBody();
1085
+ };
1086
+
1087
+ enum btTypedConstraintType {
1088
+ "POINT2POINT_CONSTRAINT_TYPE",
1089
+ "HINGE_CONSTRAINT_TYPE",
1090
+ "CONETWIST_CONSTRAINT_TYPE",
1091
+ "D6_CONSTRAINT_TYPE",
1092
+ "SLIDER_CONSTRAINT_TYPE",
1093
+ "CONTACT_CONSTRAINT_TYPE",
1094
+ "D6_SPRING_CONSTRAINT_TYPE",
1095
+ "GEAR_CONSTRAINT_TYPE",
1096
+ "FIXED_CONSTRAINT_TYPE",
1097
+ "MAX_CONSTRAINT_TYPE"
1098
+ };
1099
+
1100
+ enum btConstraintParams {
1101
+ "BT_CONSTRAINT_ERP",
1102
+ "BT_CONSTRAINT_STOP_ERP",
1103
+ "BT_CONSTRAINT_CFM",
1104
+ "BT_CONSTRAINT_STOP_CFM"
1105
+ };
1106
+
1107
+ interface btPoint2PointConstraint {
1108
+ void btPoint2PointConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btVector3 pivotInA, [Ref] btVector3 pivotInB);
1109
+ void btPoint2PointConstraint([Ref] btRigidBody rbA, [Ref] btVector3 pivotInA);
1110
+ void setPivotA([Const, Ref] btVector3 pivotA);
1111
+ void setPivotB([Const, Ref] btVector3 pivotB);
1112
+ [Const, Ref] btVector3 getPivotInA();
1113
+ [Const, Ref] btVector3 getPivotInB();
1114
+
1115
+ [Value] attribute btConstraintSetting m_setting;
1116
+ };
1117
+ btPoint2PointConstraint implements btTypedConstraint;
1118
+
1119
+ interface btGeneric6DofConstraint {
1120
+ void btGeneric6DofConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btTransform frameInA, [Ref] btTransform frameInB, boolean useLinearFrameReferenceFrameA);
1121
+ void btGeneric6DofConstraint([Ref] btRigidBody rbB, [Ref] btTransform frameInB, boolean useLinearFrameReferenceFrameB);
1122
+ void setLinearLowerLimit([Const, Ref] btVector3 linearLower);
1123
+ void setLinearUpperLimit([Const, Ref] btVector3 linearUpper);
1124
+ void setAngularLowerLimit([Const, Ref] btVector3 angularLower);
1125
+ void setAngularUpperLimit([Const, Ref] btVector3 angularUpper);
1126
+ [Const, Ref] btTransform getFrameOffsetA();
1127
+ };
1128
+ btGeneric6DofConstraint implements btTypedConstraint;
1129
+
1130
+ interface btGeneric6DofSpringConstraint {
1131
+ void btGeneric6DofSpringConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btTransform frameInA, [Ref] btTransform frameInB, boolean useLinearFrameReferenceFrameA);
1132
+ void btGeneric6DofSpringConstraint([Ref] btRigidBody rbB, [Ref] btTransform frameInB, boolean useLinearFrameReferenceFrameB);
1133
+ void enableSpring(long index, boolean onOff);
1134
+ void setStiffness(long index, float stiffness);
1135
+ void setDamping(long index, float damping);
1136
+ void setEquilibriumPoint(long index, float val);
1137
+ void setEquilibriumPoint(long index);
1138
+ void setEquilibriumPoint();
1139
+ };
1140
+ btGeneric6DofSpringConstraint implements btGeneric6DofConstraint;
1141
+
1142
+ interface btSequentialImpulseConstraintSolver {
1143
+ void btSequentialImpulseConstraintSolver();
1144
+ };
1145
+
1146
+ interface btConeTwistConstraint {
1147
+ void btConeTwistConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btTransform rbAFrame, [Ref] btTransform rbBFrame);
1148
+ void btConeTwistConstraint([Ref] btRigidBody rbA, [Ref] btTransform rbAFrame);
1149
+
1150
+ void setLimit(long limitIndex, float limitValue);
1151
+ void setAngularOnly(boolean angularOnly);
1152
+ void setDamping(float damping);
1153
+ void enableMotor(boolean b);
1154
+ void setMaxMotorImpulse(float maxMotorImpulse);
1155
+ void setMaxMotorImpulseNormalized(float maxMotorImpulse);
1156
+ void setMotorTarget([Const,Ref] btQuaternion q);
1157
+ void setMotorTargetInConstraintSpace([Const,Ref] btQuaternion q);
1158
+ };
1159
+ btConeTwistConstraint implements btTypedConstraint;
1160
+
1161
+ interface btHingeConstraint {
1162
+ void btHingeConstraint ([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btVector3 pivotInA, [Ref] btVector3 pivotInB, [Ref] btVector3 axisInA, [Ref] btVector3 axisInB, optional boolean useReferenceFrameA);
1163
+ //void btHingeConstraint ([Ref] btRigidBody rbA, [Ref] btVector3 pivotInA, [Ref] btVector3 axisInA, optional boolean useReferenceFrameA);
1164
+ void btHingeConstraint ([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Ref] btTransform rbAFrame, [Ref] btTransform rbBFrame, optional boolean useReferenceFrameA);
1165
+ void btHingeConstraint ([Ref] btRigidBody rbA, [Ref] btTransform rbAFrame, optional boolean useReferenceFrameA);
1166
+
1167
+ float getHingeAngle();
1168
+
1169
+ void setLimit(float low, float high, float softness, float biasFactor, optional float relaxationFactor);
1170
+ void enableAngularMotor(boolean enableMotor, float targetVelocity, float maxMotorImpulse);
1171
+ void setAngularOnly(boolean angularOnly);
1172
+
1173
+ void enableMotor(boolean enableMotor);
1174
+ void setMaxMotorImpulse(float maxMotorImpulse);
1175
+ //void setMotorTarget([Const,Ref] btQuaternion qAinB, float dt);
1176
+ void setMotorTarget(float targetAngle, float dt);
1177
+ };
1178
+ btHingeConstraint implements btTypedConstraint;
1179
+
1180
+ interface btSliderConstraint {
1181
+ void btSliderConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Const,Ref] btTransform frameInA, [Const,Ref] btTransform frameInB, boolean useLinearReferenceFrameA);
1182
+ void btSliderConstraint([Ref] btRigidBody rbB, [Const,Ref] btTransform frameInB, boolean useLinearReferenceFrameA);
1183
+
1184
+ [Const] float getLinearPos();
1185
+ [Const] float getAngularPos();
1186
+
1187
+ void setLowerLinLimit(float lowerLimit);
1188
+ void setUpperLinLimit(float upperLimit);
1189
+ void setLowerAngLimit(float lowerAngLimit);
1190
+ void setUpperAngLimit(float upperAngLimit);
1191
+
1192
+ void setPoweredLinMotor(boolean onOff);
1193
+ void setMaxLinMotorForce(float maxLinMotorForce);
1194
+ void setTargetLinMotorVelocity(float targetLinMotorVelocity);
1195
+ };
1196
+ btSliderConstraint implements btTypedConstraint;
1197
+
1198
+ interface btFixedConstraint {
1199
+ void btFixedConstraint([Ref] btRigidBody rbA, [Ref] btRigidBody rbB, [Const,Ref] btTransform frameInA, [Const,Ref] btTransform frameInB);
1200
+ };
1201
+ btFixedConstraint implements btTypedConstraint;
1202
+
1203
+ enum btConstraintSolverType {
1204
+ "BT_SEQUENTIAL_IMPULSE_SOLVER",
1205
+ "BT_MLCP_SOLVER"
1206
+ };
1207
+
1208
+ interface btConstraintSolver {
1209
+ };
1210
+
1211
+ interface btDispatcherInfo {
1212
+ attribute float m_timeStep;
1213
+ attribute long m_stepCount;
1214
+ attribute long m_dispatchFunc;
1215
+ attribute float m_timeOfImpact;
1216
+ attribute boolean m_useContinuous;
1217
+ attribute boolean m_enableSatConvex;
1218
+ attribute boolean m_enableSPU;
1219
+ attribute boolean m_useEpa;
1220
+ attribute float m_allowedCcdPenetration;
1221
+ attribute boolean m_useConvexConservativeDistanceUtil;
1222
+ attribute float m_convexConservativeDistanceThreshold;
1223
+ };
1224
+
1225
+ interface btCollisionWorld {
1226
+ btDispatcher getDispatcher();
1227
+ void rayTest([Const, Ref] btVector3 rayFromWorld, [Const, Ref] btVector3 rayToWorld, [Ref] RayResultCallback resultCallback);
1228
+ btOverlappingPairCache getPairCache();
1229
+ [Ref] btDispatcherInfo getDispatchInfo();
1230
+ void addCollisionObject(btCollisionObject collisionObject, optional short collisionFilterGroup, optional short collisionFilterMask);
1231
+ void removeCollisionObject(btCollisionObject collisionObject);
1232
+ [Const] btBroadphaseInterface getBroadphase ();
1233
+ void convexSweepTest([Const] btConvexShape castShape, [Const, Ref] btTransform from, [Const, Ref] btTransform to, [Ref] ConvexResultCallback resultCallback, float allowedCcdPenetration);
1234
+ void contactPairTest(btCollisionObject colObjA, btCollisionObject colObjB, [Ref] ContactResultCallback resultCallback);
1235
+ void contactTest(btCollisionObject colObj, [Ref] ContactResultCallback resultCallback);
1236
+ void updateSingleAabb(btCollisionObject colObj);
1237
+ void setDebugDrawer(btIDebugDraw debugDrawer);
1238
+ btIDebugDraw getDebugDrawer();
1239
+ void debugDrawWorld();
1240
+ void debugDrawObject([Const, Ref] btTransform worldTransform, [Const] btCollisionShape shape, [Const, Ref] btVector3 color);
1241
+ };
1242
+
1243
+ interface btContactSolverInfo {
1244
+ attribute boolean m_splitImpulse;
1245
+ attribute long m_splitImpulsePenetrationThreshold;
1246
+ attribute long m_numIterations;
1247
+ attribute float m_erp; //error reduction for non-contact constraints
1248
+ attribute float m_erp2; //error reduction for contact constraints
1249
+ };
1250
+
1251
+ interface btDynamicsWorld {
1252
+ void addAction(btActionInterface action);
1253
+ void removeAction(btActionInterface action);
1254
+ [Ref] btContactSolverInfo getSolverInfo();
1255
+ //https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html
1256
+ // void setInternalTickCallback(VoidPtr cb, optional VoidPtr worldUserInfo, optional boolean isPreTick);
1257
+ };
1258
+ btDynamicsWorld implements btCollisionWorld;
1259
+
1260
+ interface btDiscreteDynamicsWorld {
1261
+ void btDiscreteDynamicsWorld(btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration);
1262
+
1263
+ void setGravity([Ref] btVector3 gravity);
1264
+ [Value] btVector3 getGravity();
1265
+
1266
+ void addRigidBody(btRigidBody body);
1267
+ void addRigidBody(btRigidBody body, short group, short mask);
1268
+ void removeRigidBody(btRigidBody body);
1269
+
1270
+ void addConstraint(btTypedConstraint constraint, optional boolean disableCollisionsBetweenLinkedBodies);
1271
+ void removeConstraint(btTypedConstraint constraint);
1272
+
1273
+ long stepSimulation(float timeStep, optional long maxSubSteps, optional float fixedTimeStep);
1274
+ };
1275
+ btDiscreteDynamicsWorld implements btDynamicsWorld;
1276
+
1277
+ [Prefix="btRaycastVehicle::", NoDelete]
1278
+ interface btVehicleTuning {
1279
+ void btVehicleTuning();
1280
+ attribute float m_suspensionStiffness;
1281
+ attribute float m_suspensionCompression;
1282
+ attribute float m_suspensionDamping;
1283
+ attribute float m_maxSuspensionTravelCm;
1284
+ attribute float m_frictionSlip;
1285
+ attribute float m_maxSuspensionForce;
1286
+ };
1287
+
1288
+ [Prefix="btDefaultVehicleRaycaster::"]
1289
+ interface btVehicleRaycasterResult {
1290
+ [Value] attribute btVector3 m_hitPointInWorld;
1291
+ [Value] attribute btVector3 m_hitNormalInWorld;
1292
+ attribute float m_distFraction;
1293
+ };
1294
+
1295
+ interface btVehicleRaycaster {
1296
+ attribute long m_collisionFilterGroup;
1297
+ attribute long m_collisionFilterMask;
1298
+ void castRay ([Const, Ref] btVector3 from, [Const, Ref] btVector3 to, [Ref] btVehicleRaycasterResult result);
1299
+ };
1300
+
1301
+ interface btDefaultVehicleRaycaster {
1302
+ void btDefaultVehicleRaycaster(btDynamicsWorld world);
1303
+ };
1304
+ btDefaultVehicleRaycaster implements btVehicleRaycaster;
1305
+
1306
+ [Prefix="btWheelInfo::"]
1307
+ interface RaycastInfo {
1308
+ [Value] attribute btVector3 m_contactNormalWS;
1309
+ [Value] attribute btVector3 m_contactPointWS;
1310
+ attribute float m_suspensionLength;
1311
+ [Value] attribute btVector3 m_hardPointWS;
1312
+ [Value] attribute btVector3 m_wheelDirectionWS;
1313
+ [Value] attribute btVector3 m_wheelAxleWS;
1314
+ attribute boolean m_isInContact;
1315
+ attribute any m_groundObject;
1316
+ };
1317
+
1318
+ interface btWheelInfoConstructionInfo {
1319
+ [Value] attribute btVector3 m_chassisConnectionCS;
1320
+ [Value] attribute btVector3 m_wheelDirectionCS;
1321
+ [Value] attribute btVector3 m_wheelAxleCS;
1322
+ attribute float m_suspensionRestLength;
1323
+ attribute float m_maxSuspensionTravelCm;
1324
+ attribute float m_wheelRadius;
1325
+ attribute float m_suspensionStiffness;
1326
+ attribute float m_wheelsDampingCompression;
1327
+ attribute float m_wheelsDampingRelaxation;
1328
+ attribute float m_frictionSlip;
1329
+ attribute float m_maxSuspensionForce;
1330
+ attribute boolean m_bIsFrontWheel;
1331
+ };
1332
+
1333
+ interface btWheelInfo {
1334
+ attribute float m_suspensionStiffness;
1335
+ attribute float m_frictionSlip;
1336
+ attribute float m_engineForce;
1337
+ attribute float m_rollInfluence;
1338
+ attribute float m_suspensionRestLength1;
1339
+ attribute float m_wheelsRadius;
1340
+ attribute float m_wheelsDampingCompression;
1341
+ attribute float m_wheelsDampingRelaxation;
1342
+ attribute float m_steering;
1343
+ attribute float m_maxSuspensionForce;
1344
+ attribute float m_maxSuspensionTravelCm;
1345
+ attribute float m_wheelsSuspensionForce;
1346
+ attribute boolean m_bIsFrontWheel;
1347
+ [Value] attribute RaycastInfo m_raycastInfo;
1348
+ [Value] attribute btVector3 m_chassisConnectionPointCS;
1349
+ void btWheelInfo([Ref] btWheelInfoConstructionInfo ci);
1350
+ float getSuspensionRestLength ();
1351
+ void updateWheel ([Const, Ref] btRigidBody chassis, [Ref] RaycastInfo raycastInfo);
1352
+ [Value] attribute btTransform m_worldTransform;
1353
+ [Value] attribute btVector3 m_wheelDirectionCS;
1354
+ [Value] attribute btVector3 m_wheelAxleCS;
1355
+ attribute float m_rotation;
1356
+ attribute float m_deltaRotation;
1357
+ attribute float m_brake;
1358
+ attribute float m_clippedInvContactDotSuspension;
1359
+ attribute float m_suspensionRelativeVelocity;
1360
+ attribute float m_skidInfo;
1361
+ };
1362
+
1363
+ interface btActionInterface {
1364
+ void updateAction (btCollisionWorld collisionWorld, float deltaTimeStep);
1365
+ };
1366
+
1367
+ interface btKinematicCharacterController {
1368
+ void btKinematicCharacterController(btPairCachingGhostObject ghostObject, btConvexShape convexShape, float stepHeight, [Const, Ref] optional btVector3 up);
1369
+
1370
+ [Const, Ref] btVector3 getUp();
1371
+ void setUp ([Const, Ref] btVector3 axis);
1372
+
1373
+ /// This should probably be called setPositionIncrementPerSimulatorStep.
1374
+ /// This is neither a direction nor a velocity, but the amount to
1375
+ /// increment the position each simulation iteration, regardless
1376
+ /// of dt.
1377
+ /// This call will reset any velocity set by setVelocityForTimeInterval().
1378
+ void setWalkDirection([Const, Ref] btVector3 walkDirection);
1379
+
1380
+ /// Caller provides a velocity with which the character should move for
1381
+ /// the given time period. After the time period, velocity is reset
1382
+ /// to zero.
1383
+ /// This call will reset any walk direction set by setWalkDirection().
1384
+ /// Negative time intervals will result in no motion.
1385
+ void setVelocityForTimeInterval([Const, Ref] btVector3 velocity,
1386
+ float timeInterval);
1387
+
1388
+ void setAngularVelocity([Const, Ref] btVector3 velocity);
1389
+ [Const, Ref] btVector3 getAngularVelocity();
1390
+
1391
+ void setLinearVelocity([Const, Ref] btVector3 velocity);
1392
+ [Value] btVector3 getLinearVelocity();
1393
+
1394
+ void setLinearDamping(float d);
1395
+ float getLinearDamping();
1396
+ void setAngularDamping(float d);
1397
+ float getAngularDamping();
1398
+
1399
+ void reset(btCollisionWorld collisionWorld);
1400
+ void warp([Const, Ref] btVector3 origin);
1401
+
1402
+ void preStep(btCollisionWorld collisionWorld);
1403
+ void playerStep(btCollisionWorld collisionWorld, float dt);
1404
+
1405
+ void setStepHeight(float h);
1406
+ float getStepHeight();
1407
+ void setFallSpeed(float fallSpeed);
1408
+ float getFallSpeed();
1409
+ void setJumpSpeed(float jumpSpeed);
1410
+ float getJumpSpeed();
1411
+ void setMaxJumpHeight(float maxJumpHeight);
1412
+ boolean canJump();
1413
+
1414
+ void jump([Const, Ref] optional btVector3 v);
1415
+
1416
+ void applyImpulse([Const, Ref] btVector3 v);
1417
+
1418
+ void setGravity([Const, Ref] btVector3 gravity);
1419
+ [Value] btVector3 getGravity();
1420
+
1421
+ /// The max slope determines the maximum angle that the controller can walk up.
1422
+ /// The slope angle is measured in radians.
1423
+ void setMaxSlope(float slopeRadians);
1424
+ float getMaxSlope();
1425
+
1426
+ void setMaxPenetrationDepth(float d);
1427
+ float getMaxPenetrationDepth();
1428
+
1429
+ btPairCachingGhostObject getGhostObject();
1430
+ void setUseGhostSweepTest(boolean useGhostObjectSweepTest);
1431
+ boolean onGround();
1432
+ void setUpInterpolate(boolean value);
1433
+ };
1434
+ btKinematicCharacterController implements btActionInterface;
1435
+
1436
+ interface btRaycastVehicle {
1437
+ void btRaycastVehicle([Const, Ref] btVehicleTuning tuning, btRigidBody chassis, btVehicleRaycaster raycaster);
1438
+ void applyEngineForce(float force, long wheel);
1439
+ void setSteeringValue(float steering, long wheel);
1440
+ [Const, Ref] btTransform getWheelTransformWS(long wheelIndex);
1441
+ void updateWheelTransform(long wheelIndex, boolean interpolatedTransform);
1442
+ [Ref] btWheelInfo addWheel([Const, Ref] btVector3 connectionPointCS0, [Const, Ref] btVector3 wheelDirectionCS0, [Const, Ref] btVector3 wheelAxleCS, float suspensionRestLength, float wheelRadius, [Const, Ref] btVehicleTuning tuning, boolean isFrontWheel);
1443
+ long getNumWheels();
1444
+ btRigidBody getRigidBody();
1445
+ [Ref] btWheelInfo getWheelInfo(long index);
1446
+ void setBrake(float brake, long wheelIndex);
1447
+ void setCoordinateSystem(long rightIndex, long upIndex, long forwardIndex);
1448
+ float getCurrentSpeedKmHour();
1449
+ [Const, Ref] btTransform getChassisWorldTransform();
1450
+ float rayCast([Ref] btWheelInfo wheel);
1451
+ void updateVehicle(float step);
1452
+ void resetSuspension();
1453
+ float getSteeringValue(long wheel);
1454
+ void updateWheelTransformsWS([Ref] btWheelInfo wheel, optional boolean interpolatedTransform);
1455
+ void setPitchControl(float pitch);
1456
+ void updateSuspension(float deltaTime);
1457
+ void updateFriction(float timeStep);
1458
+ long getRightAxis();
1459
+ long getUpAxis();
1460
+ long getForwardAxis();
1461
+ [Value] btVector3 getForwardVector();
1462
+ long getUserConstraintType();
1463
+ void setUserConstraintType(long userConstraintType);
1464
+ void setUserConstraintId(long uid);
1465
+ long getUserConstraintId();
1466
+ };
1467
+ btRaycastVehicle implements btActionInterface;
1468
+
1469
+ interface btGhostObject {
1470
+ void btGhostObject();
1471
+ long getNumOverlappingObjects();
1472
+ btCollisionObject getOverlappingObject(long index);
1473
+ };
1474
+ btGhostObject implements btCollisionObject;
1475
+
1476
+ interface btPairCachingGhostObject {
1477
+ void btPairCachingGhostObject();
1478
+ };
1479
+ btPairCachingGhostObject implements btGhostObject;
1480
+
1481
+ interface btGhostPairCallback {
1482
+ void btGhostPairCallback();
1483
+ };
1484
+
1485
+ // interface btMultiBodyJointFeedback {
1486
+ // [Value] attribute btSpatialForceVector m_reactionForces;
1487
+ // };
1488
+
1489
+ enum btMultibodyLink_eFeatherstoneJointType {
1490
+ "btMultibodyLink::eRevolute",
1491
+ "btMultibodyLink::ePrismatic",
1492
+ "btMultibodyLink::eSpherical",
1493
+ "btMultibodyLink::ePlanar",
1494
+ "btMultibodyLink::eFixed",
1495
+ "btMultibodyLink::eInvalid"
1496
+ };
1497
+
1498
+ interface btMultibodyLink {
1499
+ attribute float m_mass; // mass of link
1500
+ [Value] attribute btVector3 m_inertiaLocal; // inertia of link (local frame; diagonal)
1501
+
1502
+ attribute long m_parent; // index of the parent link (assumed to be < index of this link), or -1 if parent is the base link.
1503
+
1504
+ [Value] attribute btQuaternion m_zeroRotParentToThis; // rotates vectors in parent-frame to vectors in local-frame (when q=0). constant.
1505
+
1506
+ [Value] attribute btVector3 m_dVector; // vector from the inboard joint pos to this link's COM. (local frame.) constant.
1507
+ //this is set to zero for planar joint (see also m_eVector comment)
1508
+
1509
+ // m_eVector is constant, but depends on the joint type:
1510
+ // revolute, fixed, prismatic, spherical: vector from parent's COM to the pivot point, in PARENT's frame.
1511
+ // planar: vector from COM of parent to COM of this link, WHEN Q = 0. (local frame.)
1512
+ // todo: fix the planar so it is consistent with the other joints
1513
+
1514
+ [Value] attribute btVector3 m_eVector;
1515
+
1516
+ [Value] attribute btSpatialMotionVector m_absFrameTotVelocity;
1517
+ [Value] attribute btSpatialMotionVector m_absFrameLocVelocity;
1518
+
1519
+ // "axis" = spatial joint axis (Mirtich Defn 9 p104). (expressed in local frame.) constant.
1520
+ // for prismatic: m_axesTop[0] = zero;
1521
+ // m_axesBottom[0] = unit vector along the joint axis.
1522
+ // for revolute: m_axesTop[0] = unit vector along the rotation axis (u);
1523
+ // m_axesBottom[0] = u cross m_dVector (i.e. COM linear motion due to the rotation at the joint)
1524
+ //
1525
+ // for spherical: m_axesTop[0][1][2] (u1,u2,u3) form a 3x3 identity matrix (3 rotation axes)
1526
+ // m_axesBottom[0][1][2] cross u1,u2,u3 (i.e. COM linear motion due to the rotation at the joint)
1527
+ //
1528
+ // for planar: m_axesTop[0] = unit vector along the rotation axis (u); defines the plane of motion
1529
+ // m_axesTop[1][2] = zero
1530
+ // m_axesBottom[0] = zero
1531
+ // m_axesBottom[1][2] = unit vectors along the translational axes on that plane
1532
+ // btSpatialMotionVector m_axes[6];
1533
+ void setAxisTop(long dof, [Const, Ref] btVector3 axis);
1534
+ void setAxisBottom(long dof, [Const, Ref] btVector3 axis);
1535
+ // void setAxisTop(long dof, [Const, Ref] float x, [Const, Ref] float y, [Const, Ref] float z);
1536
+ // void setAxisBottom(long dof, [Const, Ref] float x, [Const, Ref] float y, [Const, Ref] float z);
1537
+ [Const, Ref] btVector3 getAxisTop(long dof);
1538
+ [Const, Ref] btVector3 getAxisBottom(long dof);
1539
+
1540
+ attribute long m_dofOffset;
1541
+ attribute long m_cfgOffset;
1542
+
1543
+ [Value] attribute btQuaternion m_cachedRotParentToThis; // rotates vectors in parent frame to vectors in local frame
1544
+ [Value] attribute btVector3 m_cachedRVector; // vector from COM of parent to COM of this link, in local frame.
1545
+
1546
+ // predicted verstion
1547
+ [Value] attribute btQuaternion m_cachedRotParentToThis_interpolate; // rotates vectors in parent frame to vectors in local frame
1548
+ [Value] attribute btVector3 m_cachedRVector_interpolate; // vector from COM of parent to COM of this link, in local frame.
1549
+
1550
+ [Value] attribute btVector3 m_appliedForce; // In WORLD frame
1551
+ [Value] attribute btVector3 m_appliedTorque; // In WORLD frame
1552
+
1553
+ [Value] attribute btVector3 m_appliedConstraintForce; // In WORLD frame
1554
+ [Value] attribute btVector3 m_appliedConstraintTorque; // In WORLD frame
1555
+
1556
+ // attribute float[7] m_jointPos;
1557
+ // attribute float[7] m_jointPos_interpolate;
1558
+
1559
+ //m_jointTorque is the joint torque applied by the user using 'addJointTorque'.
1560
+ //It gets set to zero after each internal stepSimulation call
1561
+ // attribute float[6] m_jointTorque;
1562
+
1563
+ attribute btMultiBodyLinkCollider m_collider;
1564
+ attribute long m_flags;
1565
+
1566
+ attribute long m_dofCount;
1567
+ attribute long m_posVarCount; //redundant but handy
1568
+
1569
+ attribute btMultibodyLink_eFeatherstoneJointType m_jointType;
1570
+
1571
+ // attribute btMultiBodyJointFeedback m_jointFeedback;
1572
+
1573
+ [Value] attribute btTransform m_cachedWorldTransform; //this cache is updated when calling btMultiBody::forwardKinematics
1574
+
1575
+ [Const] attribute DOMString m_linkName; //m_linkName memory needs to be managed by the developer/user!
1576
+ [Const] attribute DOMString m_jointName; //m_jointName memory needs to be managed by the developer/user!
1577
+ [Const] attribute VoidPtr m_userPtr; //m_userPtr ptr needs to be managed by the developer/user!
1578
+
1579
+ attribute float m_jointDamping; //todo: implement this internally. It is unused for now, it is set by a URDF loader. User can apply manual damping.
1580
+ attribute float m_jointFriction; //todo: implement this internally. It is unused for now, it is set by a URDF loader. User can apply manual friction using a velocity motor.
1581
+ attribute float m_jointLowerLimit; //todo: implement this internally. It is unused for now, it is set by a URDF loader.
1582
+ attribute float m_jointUpperLimit; //todo: implement this internally. It is unused for now, it is set by a URDF loader.
1583
+ attribute float m_jointMaxForce; //todo: implement this internally. It is unused for now, it is set by a URDF loader.
1584
+ attribute float m_jointMaxVelocity; //todo: implement this internally. It is unused for now, it is set by a URDF loader.
1585
+
1586
+ // ctor: set some sensible defaults
1587
+ void btMultibodyLink();
1588
+ };
1589
+
1590
+ interface btMultiBodyLinkCollider : btCollisionObject {
1591
+ attribute btMultiBody m_multiBody;
1592
+ attribute long m_link;
1593
+
1594
+ void btMultiBodyLinkCollider(btMultiBody multiBody, long link);
1595
+ [Const] static btMultiBodyLinkCollider upcast([Const] btCollisionObject colObj);
1596
+ boolean checkCollideWithOverride([Const] btCollisionObject co);
1597
+ };
1598
+ btMultiBodyLinkCollider implements btCollisionObject;
1599
+
1600
+ interface btMultiBody {
1601
+ void btMultiBody(long n_links, // NOT including the base
1602
+ float mass, // mass of base
1603
+ [Const, Ref] btVector3 inertia, // inertia of base, in base frame; assumed diagonal
1604
+ boolean fixed_base_, // whether the base is fixed (true) or can move (false)
1605
+ boolean can_sleep_, optional boolean deprecatedMultiDof);
1606
+
1607
+ //note: fixed link collision with parent is always disabled
1608
+ void setupFixed(long i, //linkIndex
1609
+ float mass,
1610
+ [Const, Ref] btVector3 inertia,
1611
+ long parent,
1612
+ [Const, Ref] btQuaternion rotParentToThis,
1613
+ [Const, Ref] btVector3 parentComToThisPivotOffset,
1614
+ [Const, Ref] btVector3 thisPivotToThisComOffset, optional boolean deprecatedDisableParentCollision);
1615
+
1616
+ void setupPrismatic(long i, // 0 to num_links-1
1617
+ float mass,
1618
+ [Const, Ref] btVector3 inertia, // in my frame; assumed diagonal
1619
+ long parent,
1620
+ [Const, Ref] btQuaternion rot_parent_to_this, // rotate points in parent frame to my frame.
1621
+ [Const, Ref] btVector3 joint_axis, // in my frame
1622
+ [Const, Ref] btVector3 parentComToThisPivotOffset,
1623
+ [Const, Ref] btVector3 thisPivotToThisComOffset,
1624
+ boolean disableParentCollision);
1625
+
1626
+ void setupRevolute(long i, // 0 to num_links-1
1627
+ float mass,
1628
+ [Const, Ref] btVector3 inertia,
1629
+ long parent,
1630
+ [Const, Ref] btQuaternion zero_rot_parent_to_this, // rotate points in parent frame to this frame, when q = 0
1631
+ [Const, Ref] btVector3 joint_axis, // in my frame
1632
+ [Const, Ref] btVector3 parent_axis_position, // vector from parent COM to joint axis, in PARENT frame
1633
+ [Const, Ref] btVector3 my_axis_position, // vector from joint axis to my COM, in MY frame
1634
+ optional boolean disableParentCollision);
1635
+
1636
+ void setupSpherical(long i, // linkIndex, 0 to num_links-1
1637
+ float mass,
1638
+ [Const, Ref] btVector3 inertia,
1639
+ long parent,
1640
+ [Const, Ref] btQuaternion rotParentToThis, // rotate points in parent frame to this frame, when q = 0
1641
+ [Const, Ref] btVector3 parentComToThisPivotOffset, // vector from parent COM to joint axis, in PARENT frame
1642
+ [Const, Ref] btVector3 thisPivotToThisComOffset, // vector from joint axis to my COM, in MY frame
1643
+ optional boolean disableParentCollision);
1644
+
1645
+ void setupPlanar(long i, // 0 to num_links-1
1646
+ float mass,
1647
+ [Const, Ref] btVector3 inertia,
1648
+ long parent,
1649
+ [Const, Ref] btQuaternion rotParentToThis, // rotate points in parent frame to this frame, when q = 0
1650
+ [Const, Ref] btVector3 rotationAxis,
1651
+ [Const, Ref] btVector3 parentComToThisComOffset, // vector from parent COM to this COM, in PARENT frame
1652
+ optional boolean disableParentCollision = false);
1653
+
1654
+ [Const, Ref] btMultibodyLink getLink(long index);
1655
+ // [Ref] btMultibodyLink getLink(long index);
1656
+
1657
+ //collider can be NULL to disable collision for the base
1658
+ void setBaseCollider(btMultiBodyLinkCollider collider);
1659
+ // [Const] btMultiBodyLinkCollider getBaseCollider();
1660
+ btMultiBodyLinkCollider getBaseCollider();
1661
+
1662
+ [Const] btMultiBodyLinkCollider getLinkCollider(long index);
1663
+
1664
+ //
1665
+ // get parent
1666
+ // input: link num from 0 to num_links-1
1667
+ // output: link num from 0 to num_links-1, OR -1 to mean the base.
1668
+ //
1669
+ long getParent(long link_num);
1670
+
1671
+ //
1672
+ // get number of links, masses, moments of inertia
1673
+ //
1674
+
1675
+ long getNumLinks();
1676
+ long getNumDofs();
1677
+ long getNumPosVars();
1678
+ float getBaseMass();
1679
+ [Const, Ref] btVector3 getBaseInertia();
1680
+ float getLinkMass(long i);
1681
+ [Const, Ref] btVector3 getLinkInertia(long i);
1682
+
1683
+
1684
+ //
1685
+ // change mass (incomplete: can only change base mass and inertia at present)
1686
+ //
1687
+
1688
+ void setBaseMass(float mass);
1689
+ void setBaseInertia([Const, Ref] btVector3 inertia);
1690
+
1691
+
1692
+ //
1693
+ // get/set pos/vel/rot/omega for the base link
1694
+ //
1695
+
1696
+ [Const, Ref] btVector3 getBasePos();
1697
+ [Const, Value] btVector3 getBaseVel();
1698
+ [Const, Ref] btQuaternion getWorldToBaseRot();
1699
+ [Const, Ref] btVector3 getInterpolateBasePos();
1700
+ [Const, Ref] btQuaternion getInterpolateWorldToBaseRot();
1701
+ [Value] btVector3 getBaseOmega();
1702
+
1703
+ void setBasePos([Const, Ref] btVector3 pos);
1704
+ void setInterpolateBasePos([Const, Ref] btVector3 pos);
1705
+ void setBaseWorldTransform([Const, Ref] btTransform tr);
1706
+ [Value] btTransform getBaseWorldTransform();
1707
+ void setInterpolateBaseWorldTransform([Const, Ref] btTransform tr);
1708
+ [Value] btTransform getInterpolateBaseWorldTransform();
1709
+ void setBaseVel([Const, Ref] btVector3 vel);
1710
+ void setWorldToBaseRot([Const, Ref] btQuaternion rot);
1711
+ void setInterpolateWorldToBaseRot([Const, Ref] btQuaternion rot);
1712
+ void setBaseOmega([Const, Ref] btVector3 omega);
1713
+
1714
+ //
1715
+ // get/set pos/vel for child links (i = 0 to num_links-1)
1716
+ //
1717
+
1718
+ float getJointPos(long i);
1719
+ float getJointVel(long i);
1720
+ // [Const] float* getJointPosMultiDof(long i);
1721
+ // [Const] float* getJointVelMultiDof(long i);
1722
+
1723
+ void setJointPos(long i, float q);
1724
+ void setJointVel(long i, float qdot);
1725
+ // void setJointPosMultiDof(long i, [Const] float* q);
1726
+ // void setJointVelMultiDof(long i, [Const] float* qdot);
1727
+
1728
+ //
1729
+ // direct access to velocities as a vector of 6 + num_links elements.
1730
+ // (omega first, then v, then joint velocities.)
1731
+ //
1732
+ // [Const] float* getVelocityVector();
1733
+
1734
+ [Const, Ref] btVector3 getRVector(long i); // vector from COM(parent(i)) to COM(i), in frame i's coords
1735
+ [Const, Ref] btQuaternion getParentToLocalRot(long i); // rotates vectors in frame parent(i) to vectors in frame i.
1736
+ [Const, Ref] btVector3 getInterpolateRVector(long i);
1737
+ [Const, Ref] btQuaternion getInterpolateParentToLocalRot(long i);
1738
+
1739
+ [Value] btVector3 localPosToWorld(long i, [Const, Ref] btVector3 vec);
1740
+ [Value] btVector3 localDirToWorld(long i, [Const, Ref] btVector3 vec);
1741
+ [Value] btVector3 worldPosToLocal(long i, [Const, Ref] btVector3 vec);
1742
+ [Value] btVector3 worldDirToLocal(long i, [Const, Ref] btVector3 vec);
1743
+
1744
+ //
1745
+ // transform a frame in local coordinate to a frame in world coordinate
1746
+ //
1747
+ [Value] btMatrix3x3 localFrameToWorld(long i, [Const, Ref] btMatrix3x3 local_frame);
1748
+
1749
+ void clearForcesAndTorques();
1750
+ void clearConstraintForces();
1751
+
1752
+ void clearVelocities();
1753
+
1754
+ void addBaseForce([Const, Ref] btVector3 f);
1755
+ void addBaseTorque([Const, Ref] btVector3 t);
1756
+ void addLinkForce(long i, [Const, Ref] btVector3 f);
1757
+ void addLinkTorque(long i, [Const, Ref] btVector3 t);
1758
+
1759
+
1760
+ void addBaseConstraintForce([Const, Ref] btVector3 f);
1761
+ void addBaseConstraintTorque([Const, Ref] btVector3 t);
1762
+ void addLinkConstraintForce(long i, [Const, Ref] btVector3 f);
1763
+ void addLinkConstraintTorque(long i, [Const, Ref] btVector3 t);
1764
+
1765
+ void addJointTorque(long i, float Q);
1766
+ void addJointTorqueMultiDof(long i, long dof, float Q);
1767
+
1768
+ [Const, Ref] btVector3 getBaseForce();
1769
+ [Const, Ref] btVector3 getBaseTorque();
1770
+ [Const, Ref] btVector3 getLinkForce(long i);
1771
+ [Const, Ref] btVector3 getLinkTorque(long i);
1772
+ float getJointTorque(long i);
1773
+ // float* getJointTorqueMultiDof(long i);
1774
+
1775
+
1776
+ //
1777
+ // dynamics routines.
1778
+ //
1779
+
1780
+ // timestep the velocities (given the external forces/torques set using addBaseForce etc).
1781
+ // also sets up caches for calcAccelerationDeltas.
1782
+ //
1783
+ // Note: the caller must provide three vectors which are used as
1784
+ // temporary scratch space. The idea here is to reduce dynamic
1785
+ // memory allocation: the same scratch vectors can be re-used
1786
+ // again and again for different Multibodies, instead of each
1787
+ // btMultiBody allocating (and then deallocating) their own
1788
+ // individual scratch buffers. This gives a considerable speed
1789
+ // improvement, at least on Windows (where dynamic memory
1790
+ // allocation appears to be fairly slow).
1791
+
1792
+
1793
+ void computeAccelerationsArticulatedBodyAlgorithmMultiDof(float dt,
1794
+ [Ref] btScalarArray scratch_r,
1795
+ [Ref] btVector3Array scratch_v,
1796
+ [Ref] btMatrix3x3Array scratch_m,
1797
+ boolean isConstraintPass,
1798
+ boolean jointFeedbackInWorldSpace,
1799
+ boolean jointFeedbackInJointFrame
1800
+ );
1801
+
1802
+ void setCanSleep(boolean canSleep);
1803
+ boolean getCanSleep();
1804
+ boolean getCanWakeup();
1805
+ void setCanWakeup(boolean canWakeup);
1806
+ boolean isAwake();
1807
+ void wakeUp();
1808
+ void goToSleep();
1809
+ void checkMotionAndSleepIfRequired(float timestep);
1810
+
1811
+ boolean hasFixedBase();
1812
+ boolean isBaseKinematic();
1813
+ boolean isBaseStaticOrKinematic();
1814
+ // set the dynamic type in the base's collision flags.
1815
+ void setBaseDynamicType(long dynamicType);
1816
+ void setFixedBase(boolean fixedBase);
1817
+
1818
+ long getCompanionId();
1819
+ void setCompanionId(long id);
1820
+ void setNumLinks(long numLinks); //careful: when changing the number of links, make sure to re-initialize or update existing links
1821
+ float getLinearDamping();
1822
+ void setLinearDamping(float damp);
1823
+ float getAngularDamping();
1824
+ void setAngularDamping(float damp);
1825
+ boolean getUseGyroTerm();
1826
+ void setUseGyroTerm(boolean useGyro);
1827
+ float getMaxCoordinateVelocity();
1828
+ void setMaxCoordinateVelocity(float maxVel);
1829
+ float getMaxAppliedImpulse();
1830
+ void setMaxAppliedImpulse(float maxImp);
1831
+
1832
+ void setHasSelfCollision(boolean hasSelfCollision);
1833
+ boolean hasSelfCollision();
1834
+
1835
+ void finalizeMultiDof();
1836
+
1837
+ void useRK4Integration(boolean use);
1838
+ boolean isUsingRK4Integration();
1839
+ void useGlobalVelocities(boolean use);
1840
+ boolean isUsingGlobalVelocities();
1841
+
1842
+ void setLinkDynamicType([Const] long i, long type);
1843
+ boolean isLinkStaticOrKinematic([Const] long i);
1844
+ boolean isLinkKinematic([Const] long i);
1845
+ boolean isLinkAndAllAncestorsStaticOrKinematic([Const] long i);
1846
+ boolean isLinkAndAllAncestorsKinematic([Const] long i);
1847
+ void setSleepThreshold(float sleepThreshold);
1848
+ void setSleepTimeout(float sleepTimeout);
1849
+ };
1850
+
1851
+ interface btMultiBodyJacobianData {
1852
+ [Value] attribute btScalarArray m_jacobians;
1853
+ [Value] attribute btScalarArray m_deltaVelocitiesUnitImpulse;
1854
+ [Value] attribute btScalarArray m_deltaVelocities;
1855
+ [Value] attribute btScalarArray scratch_r;
1856
+ [Value] attribute btVector3Array scratch_v;
1857
+ [Value] attribute btMatrix3x3Array scratch_m;
1858
+ attribute btSolverBodyArray m_solverBodyPool;
1859
+ attribute long m_fixedBodyId;
1860
+ };
1861
+
1862
+ interface btMultiBodyConstraint {
1863
+ // void btMultiBodyConstraint(btMultiBody bodyA, btMultiBody bodyB,long linkA, long linkB, long numRows, boolean isUnilateral);
1864
+
1865
+ long getIslandIdA();
1866
+ long getIslandIdB();
1867
+
1868
+ // void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
1869
+ // [Ref] btMultiBodyJacobianData data,
1870
+ // [Const, Ref] btContactSolverInfo infoGlobal);
1871
+
1872
+ long getNumRows();
1873
+ btMultiBody getMultiBodyA();
1874
+ btMultiBody getMultiBodyB();
1875
+
1876
+ // current constraint position
1877
+ // constraint is pos >= 0 for unilateral, or pos = 0 for bilateral
1878
+ // NOTE: ignored position for friction rows.
1879
+ float getPosition(long row);
1880
+ void setPosition(long row, float pos);
1881
+
1882
+ boolean isUnilateral();
1883
+
1884
+ // jacobian blocks.
1885
+ // each of size 6 + num_links. (jacobian2 is null if no body2.)
1886
+ // format: 3 'omega' coefficients, 3 'v' coefficients, then the 'qdot' coefficients.
1887
+ // float* jacobianA(long row);
1888
+ // [Const] float* jacobianA(long row);
1889
+ // float* jacobianB(long row);
1890
+ // [Const] float* jacobianB(long row);
1891
+ float getMaxAppliedImpulse();
1892
+ void setMaxAppliedImpulse(float maxImp);
1893
+ };
1894
+
1895
+ interface btMultiBodyMLCPConstraintSolver : btMultiBodyConstraintSolver {
1896
+ void btMultiBodyMLCPConstraintSolver(btMLCPSolverInterface solver);
1897
+ void setMLCPSolver(btMLCPSolverInterface solver);
1898
+ long getNumFallbacks();
1899
+ void setNumFallbacks(long num);
1900
+ btConstraintSolverType getSolverType();
1901
+ };
1902
+ btMultiBodyMLCPConstraintSolver implements btMultiBodyConstraintSolver;
1903
+
1904
+ interface btMultiBodyConstraintSolver : btSequentialImpulseConstraintSolver {
1905
+ void btMultiBodyConstraintSolver();
1906
+ // void solveMultiBodyGroup(btCollisionObject* bodies, long numBodies, btPersistentManifold* manifold,long numManifolds,btTypedConstraint* constraints,long numConstraints,btMultiBodyConstraint* multiBodyConstraints, long numMultiBodyConstraints, [Const, Ref] btContactSolverInfo info, btIDebugDraw debugDrawer, btDispatcher dispatcher);
1907
+ };
1908
+ btMultiBodyConstraintSolver implements btSequentialImpulseConstraintSolver;
1909
+
1910
+ interface btMultiBodyDynamicsWorld : btDiscreteDynamicsWorld {
1911
+ void btMultiBodyDynamicsWorld(btDispatcher dispatcher, btBroadphaseInterface pairCache, btMultiBodyConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration);
1912
+
1913
+ void addMultiBody(btMultiBody body, short group, short mask);
1914
+ void removeMultiBody(btMultiBody body);
1915
+ void addMultiBodyConstraint( btMultiBodyConstraint constraint);
1916
+ void removeMultiBodyConstraint( btMultiBodyConstraint constraint);
1917
+ };
1918
+ btMultiBodyDynamicsWorld implements btDiscreteDynamicsWorld;
1919
+
1920
+ interface btMultiBodyFixedConstraint : btMultiBodyConstraint {
1921
+ void btMultiBodyFixedConstraint(btMultiBody bodyA, long linkA, btMultiBody bodyB, long linkB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB, [Const, Ref] btMatrix3x3 frameInA, [Const, Ref] btMatrix3x3 frameInB);
1922
+
1923
+ void finalizeMultiDof();
1924
+
1925
+ long getIslandIdA();
1926
+ long getIslandIdB();
1927
+
1928
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
1929
+ [Ref] btMultiBodyJacobianData data,
1930
+ [Const, Ref] btContactSolverInfo infoGlobal);
1931
+
1932
+ [Const, Ref] btVector3 getPivotInA();
1933
+ void setPivotInA([Const, Ref] btVector3 pivotInA);
1934
+ [Const, Ref] btVector3 getPivotInB();
1935
+ void setPivotInB([Const, Ref] btVector3 pivotInB);
1936
+
1937
+ [Const, Ref] btMatrix3x3 getFrameInA();
1938
+ void setFrameInA([Const, Ref] btMatrix3x3 frameInA);
1939
+ [Const, Ref] btMatrix3x3 getFrameInB();
1940
+ void setFrameInB([Const, Ref] btMatrix3x3 frameInB);
1941
+ };
1942
+ btMultiBodyFixedConstraint implements btMultiBodyConstraint;
1943
+
1944
+ interface btMultiBodyGearConstraint : btMultiBodyConstraint {
1945
+ void btMultiBodyGearConstraint(btMultiBody bodyA, long linkA, btMultiBody bodyB, long linkB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB, [Const, Ref] btMatrix3x3 frameInA, [Const, Ref] btMatrix3x3 frameInB);
1946
+
1947
+ void finalizeMultiDof();
1948
+
1949
+ long getIslandIdA();
1950
+ long getIslandIdB();
1951
+
1952
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
1953
+ [Ref] btMultiBodyJacobianData data,
1954
+ [Const, Ref] btContactSolverInfo infoGlobal);
1955
+
1956
+ [Const, Ref] btVector3 getPivotInA();
1957
+ void setPivotInA([Const, Ref] btVector3 pivotInA);
1958
+ [Const, Ref] btVector3 getPivotInB();
1959
+ void setPivotInB([Const, Ref] btVector3 pivotInB);
1960
+
1961
+ [Const, Ref] btMatrix3x3 getFrameInA();
1962
+ void setFrameInA([Const, Ref] btMatrix3x3 frameInA);
1963
+ [Const, Ref] btMatrix3x3 getFrameInB();
1964
+ void setFrameInB([Const, Ref] btMatrix3x3 frameInB);
1965
+
1966
+ void setGearRatio(float gearRatio);
1967
+ void setGearAuxLink(long gearAuxLink);
1968
+ void setRelativePositionTarget(float relPosTarget);
1969
+ void setErp(float erp);
1970
+ };
1971
+ btMultiBodyGearConstraint implements btMultiBodyConstraint;
1972
+
1973
+ interface btMultiBodyJointLimitConstraint : btMultiBodyConstraint {
1974
+ void btMultiBodyJointLimitConstraint(btMultiBody body, long link, float lower, float upper);
1975
+
1976
+ void finalizeMultiDof();
1977
+
1978
+ long getIslandIdA();
1979
+ long getIslandIdB();
1980
+
1981
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
1982
+ [Ref] btMultiBodyJacobianData data,
1983
+ [Const, Ref] btContactSolverInfo infoGlobal);
1984
+
1985
+ float getLowerBound();
1986
+ float getUpperBound();
1987
+ void setLowerBound(float lower);
1988
+ void setUpperBound(float upper);
1989
+ };
1990
+ btMultiBodyJointLimitConstraint implements btMultiBodyConstraint;
1991
+
1992
+ interface btMultiBodyJointMotor : btMultiBodyConstraint {
1993
+ void btMultiBodyJointMotor(btMultiBody body, long link, long linkDoF, float desiredVelocity, float maxMotorImpulse);
1994
+
1995
+ void finalizeMultiDof();
1996
+
1997
+ long getIslandIdA();
1998
+ long getIslandIdB();
1999
+
2000
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
2001
+ [Ref] btMultiBodyJacobianData data,
2002
+ [Const, Ref] btContactSolverInfo infoGlobal);
2003
+
2004
+ void setVelocityTarget(float velTarget, optional float kd);
2005
+ void setPositionTarget(float posTarget, optional float kp);
2006
+ void setErp(float erp);
2007
+ float getErp();
2008
+ void setRhsClamp(float rhsClamp);
2009
+ };
2010
+ btMultiBodyJointMotor implements btMultiBodyConstraint;
2011
+
2012
+ interface btMultiBodyPoint2Point : btMultiBodyConstraint {
2013
+ void btMultiBodyPoint2Point(btMultiBody body, long link, btRigidBody bodyB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB);
2014
+ void btMultiBodyPoint2Point(btMultiBody bodyA, long linkA, btMultiBody bodyB, long linkB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB);
2015
+
2016
+ void finalizeMultiDof();
2017
+
2018
+ long getIslandIdA();
2019
+ long getIslandIdB();
2020
+
2021
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
2022
+ [Ref] btMultiBodyJacobianData data,
2023
+ [Const, Ref] btContactSolverInfo infoGlobal);
2024
+
2025
+ [Const, Ref] btVector3 getPivotInB();
2026
+ void setPivotInB([Const, Ref] btVector3 pivotInB);
2027
+ };
2028
+ btMultiBodyPoint2Point implements btMultiBodyConstraint;
2029
+
2030
+ interface btMultiBodySliderConstraint : btMultiBodyConstraint {
2031
+ void btMultiBodySliderConstraint(btMultiBody body, long link, btRigidBody bodyB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB, [Const, Ref] btMatrix3x3 frameInA, [Const, Ref] btMatrix3x3 frameInB, [Const, Ref] btVector3 jointAxis);
2032
+ void btMultiBodySliderConstraint(btMultiBody bodyA, long linkA, btMultiBody bodyB, long linkB, [Const, Ref] btVector3 pivotInA, [Const, Ref] btVector3 pivotInB, [Const, Ref] btMatrix3x3 frameInA, [Const, Ref] btMatrix3x3 frameInB, [Const, Ref] btVector3 jointAxis);
2033
+
2034
+ void finalizeMultiDof();
2035
+
2036
+ long getIslandIdA();
2037
+ long getIslandIdB();
2038
+
2039
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
2040
+ [Ref] btMultiBodyJacobianData data,
2041
+ [Const, Ref] btContactSolverInfo infoGlobal);
2042
+
2043
+ [Const, Ref] btVector3 getPivotInA();
2044
+ void setPivotInA([Const, Ref] btVector3 pivotInA);
2045
+ [Const, Ref] btVector3 getPivotInB();
2046
+ void setPivotInB([Const, Ref] btVector3 pivotInB);
2047
+ [Const, Ref] btMatrix3x3 getFrameInA();
2048
+ void setFrameInA([Const, Ref] btMatrix3x3 frameInA);
2049
+ [Const, Ref] btMatrix3x3 getFrameInB();
2050
+ void setFrameInB([Const, Ref] btMatrix3x3 frameInB);
2051
+ [Const, Ref] btVector3 getJointAxis();
2052
+ void setJointAxis([Const, Ref] btVector3 jointAxis);
2053
+ };
2054
+ btMultiBodySliderConstraint implements btMultiBodyConstraint;
2055
+
2056
+ interface btMultiBodySphericalJointLimit : btMultiBodyConstraint {
2057
+ void btMultiBodySphericalJointLimit(btMultiBody body, long link,
2058
+ float swingxRange,
2059
+ float swingyRange,
2060
+ float twistRange,
2061
+ float maxAppliedImpulse);
2062
+
2063
+ void finalizeMultiDof();
2064
+
2065
+ long getIslandIdA();
2066
+ long getIslandIdB();
2067
+
2068
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
2069
+ [Ref] btMultiBodyJacobianData data,
2070
+ [Const, Ref] btContactSolverInfo infoGlobal);
2071
+
2072
+ void setVelocityTarget([Const, Ref] btVector3 velTarget, optional float kd);
2073
+ void setVelocityTargetMultiDof([Const, Ref] btVector3 velTarget, [Const, Ref] optional btVector3 kd);
2074
+ void setPositionTarget([Const, Ref] btQuaternion posTarget, optional float kp);
2075
+ void setPositionTargetMultiDof([Const, Ref] btQuaternion posTarget, [Const, Ref] optional btVector3 kp);
2076
+ void setErp(float erp);
2077
+ float getErp();
2078
+ void setRhsClamp(float rhsClamp);
2079
+ float getMaxAppliedImpulseMultiDof(long i);
2080
+ void setMaxAppliedImpulseMultiDof([Const, Ref] btVector3 maxImp);
2081
+ };
2082
+ btMultiBodySphericalJointLimit implements btMultiBodyConstraint;
2083
+
2084
+ interface btMultiBodySphericalJointMotor : btMultiBodyConstraint {
2085
+ void btMultiBodySphericalJointMotor(btMultiBody body, long link, float maxMotorImpulse);
2086
+
2087
+ void finalizeMultiDof();
2088
+
2089
+ long getIslandIdA();
2090
+ long getIslandIdB();
2091
+
2092
+ void createConstraintRows([Ref] btMultiBodyConstraintArray constraintRows,
2093
+ [Ref] btMultiBodyJacobianData data,
2094
+ [Const, Ref] btContactSolverInfo infoGlobal);
2095
+
2096
+ void setVelocityTarget([Const, Ref] btVector3 velTarget, optional float kd);
2097
+ void setVelocityTargetMultiDof([Const, Ref] btVector3 velTarget, [Const, Ref] optional btVector3 kd);
2098
+ void setPositionTarget([Const, Ref] btQuaternion posTarget, optional float kp);
2099
+ void setPositionTargetMultiDof([Const, Ref] btQuaternion posTarget, [Const, Ref] optional btVector3 kp);
2100
+ void setErp(float erp);
2101
+ float getErp();
2102
+ void setRhsClamp(float rhsClamp);
2103
+ float getMaxAppliedImpulseMultiDof(long i);
2104
+ void setMaxAppliedImpulseMultiDof([Const, Ref] btVector3 maxImp);
2105
+ float getDamping(long i);
2106
+ void setDamping([Const, Ref] btVector3 damping);
2107
+ };
2108
+ btMultiBodySphericalJointMotor implements btMultiBodyConstraint;
2109
+
2110
+ interface btMultiBodySolverConstraint {
2111
+ attribute long m_deltaVelAindex;//more generic version of m_relpos1CrossNormal/m_contactNormal1
2112
+ [Value] attribute btVector3 m_relpos1CrossNormal;
2113
+ [Value] attribute btVector3 m_contactNormal1;
2114
+ attribute long m_jacAindex;
2115
+
2116
+ attribute long m_deltaVelBindex;
2117
+ [Value] attribute btVector3 m_contactNormal2; //usually m_contactNormal2 == -m_contactNormal1, but not always
2118
+ [Value] attribute btVector3 m_relpos2CrossNormal;
2119
+ attribute long m_jacBindex;
2120
+
2121
+ [Value] attribute btVector3 m_angularComponentA;
2122
+ [Value] attribute btVector3 m_angularComponentB;
2123
+
2124
+ // mutable btSimdScalar m_appliedPushImpulse;
2125
+ // mutable btSimdScalar m_appliedImpulse;
2126
+
2127
+ attribute float m_friction;
2128
+ attribute float m_jacDiagABInv;
2129
+ attribute float m_rhs;
2130
+ attribute float m_cfm;
2131
+
2132
+ attribute float m_lowerLimit;
2133
+ attribute float m_upperLimit;
2134
+ attribute float m_rhsPenetration;
2135
+
2136
+ attribute long m_overrideNumSolverIterations;
2137
+ attribute long m_frictionIndex;
2138
+
2139
+ attribute long m_solverBodyIdA;
2140
+ attribute btMultiBody m_multiBodyA;
2141
+ attribute long m_linkA;
2142
+
2143
+ attribute long m_solverBodyIdB;
2144
+ attribute btMultiBody m_multiBodyB;
2145
+ attribute long m_linkB;
2146
+ };
2147
+
2148
+ // enum btMultiBodySolverConstraint_btSolverConstraintType {
2149
+ // "btMultiBodySolverConstraint::BT_SOLVER_CONTACT_1D",
2150
+ // "btMultiBodySolverConstraint::BT_SOLVER_FRICTION_1D"
2151
+ // };
2152
+
2153
+ interface btMultiBodyConstraintArray {
2154
+ void btMultiBodyConstraintArray();
2155
+ long size();
2156
+ [Const, Ref] btMultiBodySolverConstraint at(long n);
2157
+ void clear();
2158
+ void pop_back();
2159
+ void resize(long newsize, [Const, Ref] btMultiBodySolverConstraint? fillData);
2160
+ [Ref] btMultiBodySolverConstraint expandNonInitializing();
2161
+ [Ref] btMultiBodySolverConstraint expand([Const, Ref] btMultiBodySolverConstraint? fillValue);
2162
+ void push_back([Const, Ref] btMultiBodySolverConstraint _Val);
2163
+ long capacity();
2164
+ void reserve(long _Count);
2165
+ };
2166
+
2167
+ interface btMLCPSolverInterface {
2168
+ //return true is it solves the problem successfully
2169
+ // boolean solveMLCP([Const, Ref] btMatrixXu A, [Const, Ref] btVectorXu b, [Ref] btVectorXu x, [Const, Ref] btVectorXu lo, [Const, Ref] btVectorXu hi, [Const, Ref] btAlignedObjectArray<int> limitDependency, long numIterations, boolean useSparsity);
2170
+ };
2171
+
2172
+ interface btDantzigSolver : btMLCPSolverInterface {
2173
+ void btDantzigSolver();
2174
+ };
2175
+ btDantzigSolver implements btMLCPSolverInterface;
2176
+
2177
+ interface btSolveProjectedGaussSeidel : btMLCPSolverInterface {
2178
+ void btSolveProjectedGaussSeidel();
2179
+ };
2180
+ btSolveProjectedGaussSeidel implements btMLCPSolverInterface;
2181
+
2182
+ interface btLemkeSolver : btMLCPSolverInterface {
2183
+ void btLemkeSolver();
2184
+ };
2185
+ btLemkeSolver implements btMLCPSolverInterface;
2186
+
2187
+ interface btMLCPSolver : btSequentialImpulseConstraintSolver {
2188
+ void btMLCPSolver(btMLCPSolverInterface solver);
2189
+
2190
+ void setMLCPSolver(btMLCPSolverInterface solver);
2191
+
2192
+ long getNumFallbacks();
2193
+ void setNumFallbacks(long num);
2194
+
2195
+ btConstraintSolverType getSolverType();
2196
+ };
2197
+ btMLCPSolver implements btSequentialImpulseConstraintSolver;
2198
+
2199
+ // soft bodies
2200
+
2201
+ interface btSoftBodyWorldInfo {
2202
+ void btSoftBodyWorldInfo();
2203
+ attribute float air_density;
2204
+ attribute float water_density;
2205
+ attribute float water_offset;
2206
+ attribute float m_maxDisplacement;
2207
+ [Value] attribute btVector3 water_normal;
2208
+ attribute btBroadphaseInterface m_broadphase;
2209
+ attribute btDispatcher m_dispatcher;
2210
+ [Value] attribute btVector3 m_gravity;
2211
+ };
2212
+
2213
+ [Prefix="btSoftBody::"]
2214
+ interface Face {
2215
+ attribute Node[] m_n;
2216
+ [Value] attribute btVector3 m_normal;
2217
+ attribute float m_ra;
2218
+ };
2219
+
2220
+ [Prefix="btSoftBody::"]
2221
+ interface tFaceArray {
2222
+ [Const] long size();
2223
+ [Const, Ref] Face at(long n);
2224
+ };
2225
+
2226
+ [Prefix="btSoftBody::"]
2227
+ interface Node {
2228
+ [Value] attribute btVector3 m_x;
2229
+ [Value] attribute btVector3 m_q;
2230
+ [Value] attribute btVector3 m_v;
2231
+ [Value] attribute btVector3 m_f;
2232
+ [Value] attribute btVector3 m_n;
2233
+ attribute float m_im;
2234
+ attribute float m_area;
2235
+ };
2236
+
2237
+ [Prefix="btSoftBody::"]
2238
+ interface tNodeArray {
2239
+ [Const] long size();
2240
+ [Const, Ref] Node at(long n);
2241
+ };
2242
+
2243
+ [Prefix="btSoftBody::"]
2244
+ interface Material {
2245
+ attribute float m_kLST;
2246
+ attribute float m_kAST;
2247
+ attribute float m_kVST;
2248
+ attribute long m_flags;
2249
+ };
2250
+
2251
+ [Prefix="btSoftBody::"]
2252
+ interface tMaterialArray {
2253
+ [Const] long size();
2254
+ Material at(long n);
2255
+ };
2256
+
2257
+ [Prefix="btSoftBody::"]
2258
+ interface Anchor {
2259
+ attribute Node m_node;
2260
+ [Value] attribute btVector3 m_local;
2261
+ attribute btRigidBody m_body;
2262
+ attribute float m_influence;
2263
+ [Value] attribute btMatrix3x3 m_c0;
2264
+ [Value] attribute btVector3 m_c1;
2265
+ attribute float m_c2;
2266
+ };
2267
+
2268
+ [Prefix="btSoftBody::"]
2269
+ interface tAnchorArray {
2270
+ [Const] long size();
2271
+ [Value] Anchor at(long n);
2272
+ void clear();
2273
+ void push_back([Ref] Anchor val);
2274
+ void pop_back();
2275
+ };
2276
+
2277
+ [Prefix="btSoftBody::"]
2278
+ interface Config {
2279
+ attribute float kVCF;
2280
+ attribute float kDP;
2281
+ attribute float kDG;
2282
+ attribute float kLF;
2283
+ attribute float kPR;
2284
+ attribute float kVC;
2285
+ attribute float kDF;
2286
+ attribute float kMT;
2287
+ attribute float kCHR;
2288
+ attribute float kKHR;
2289
+ attribute float kSHR;
2290
+ attribute float kAHR;
2291
+ attribute float kSRHR_CL;
2292
+ attribute float kSKHR_CL;
2293
+ attribute float kSSHR_CL;
2294
+ attribute float kSR_SPLT_CL;
2295
+ attribute float kSK_SPLT_CL;
2296
+ attribute float kSS_SPLT_CL;
2297
+ attribute float maxvolume;
2298
+ attribute float timescale;
2299
+ attribute long viterations;
2300
+ attribute long piterations;
2301
+ attribute long diterations;
2302
+ attribute long citerations;
2303
+ attribute long collisions;
2304
+ };
2305
+
2306
+ interface btSoftBody {
2307
+ void btSoftBody(btSoftBodyWorldInfo worldInfo, long node_count, btVector3 x, float[] m);
2308
+
2309
+ [Value] attribute Config m_cfg;
2310
+ [Value] attribute tNodeArray m_nodes;
2311
+ [Value] attribute tFaceArray m_faces;
2312
+ [Value] attribute tMaterialArray m_materials;
2313
+ [Value] attribute tAnchorArray m_anchors;
2314
+
2315
+ [Const] boolean checkLink( long node0, long node1);
2316
+ [Const] boolean checkFace( long node0, long node1, long node2);
2317
+ Material appendMaterial();
2318
+ void appendNode( [Const, Ref] btVector3 x, float m);
2319
+ void appendLink( long node0, long node1, Material mat, boolean bcheckexist);
2320
+ void appendFace( long node0, long node1, long node2, Material mat);
2321
+ void appendTetra( long node0, long node1, long node2, long node3, Material mat);
2322
+ void appendAnchor( long node, btRigidBody body, boolean disableCollisionBetweenLinkedBodies, float influence);
2323
+ void addForce([Const, Ref] btVector3 force);
2324
+ void addForce([Const, Ref] btVector3 force, long node);
2325
+ void addAeroForceToNode([Const, Ref] btVector3 windVelocity, long nodeIndex);
2326
+ [Const] float getTotalMass();
2327
+ void setTotalMass( float mass, boolean fromfaces);
2328
+ void setMass(long node, float mass);
2329
+ void transform( [Const, Ref] btTransform trs);
2330
+ void translate( [Const, Ref] btVector3 trs);
2331
+ void rotate( [Const, Ref] btQuaternion rot);
2332
+ void scale( [Const, Ref] btVector3 scl);
2333
+ long generateClusters(long k, optional long maxiterations);
2334
+ long generateBendingConstraints(long distance, Material mat);
2335
+ btSoftBody upcast(btCollisionObject colObj);
2336
+ float getRestLengthScale();
2337
+ void setRestLengthScale(float restLength);
2338
+ };
2339
+ btSoftBody implements btCollisionObject;
2340
+
2341
+ interface btSoftBodyRigidBodyCollisionConfiguration {
2342
+ void btSoftBodyRigidBodyCollisionConfiguration([Ref] optional btDefaultCollisionConstructionInfo info);
2343
+ };
2344
+ btSoftBodyRigidBodyCollisionConfiguration implements btDefaultCollisionConfiguration;
2345
+
2346
+ interface btSoftBodySolver {
2347
+ };
2348
+
2349
+ interface btDefaultSoftBodySolver {
2350
+ void btDefaultSoftBodySolver ();
2351
+ };
2352
+ btDefaultSoftBodySolver implements btSoftBodySolver;
2353
+
2354
+ interface btSoftBodyArray {
2355
+ [Const] long size();
2356
+ [Const] btSoftBody at(long n);
2357
+ };
2358
+
2359
+ interface btSoftRigidDynamicsWorld {
2360
+ void btSoftRigidDynamicsWorld(btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration, btSoftBodySolver softBodySolver);
2361
+
2362
+ void addSoftBody(btSoftBody body, short collisionFilterGroup, short collisionFilterMask);
2363
+ void removeSoftBody(btSoftBody body);
2364
+ void removeCollisionObject(btCollisionObject collisionObject);
2365
+
2366
+ [Ref] btSoftBodyWorldInfo getWorldInfo();
2367
+ [Ref] btSoftBodyArray getSoftBodyArray();
2368
+ };
2369
+ btSoftRigidDynamicsWorld implements btDiscreteDynamicsWorld;
2370
+
2371
+ interface btSoftBodyHelpers {
2372
+ void btSoftBodyHelpers();
2373
+
2374
+ btSoftBody CreateRope([Ref] btSoftBodyWorldInfo worldInfo, [Const, Ref] btVector3 from, [Const, Ref] btVector3 to, long res, long fixeds);
2375
+ btSoftBody CreatePatch([Ref] btSoftBodyWorldInfo worldInfo, [Const, Ref] btVector3 corner00, [Const, Ref] btVector3 corner10, [Const, Ref] btVector3 corner01, [Const, Ref] btVector3 corner11, long resx, long resy, long fixeds, boolean gendiags);
2376
+ btSoftBody CreatePatchUV([Ref] btSoftBodyWorldInfo worldInfo, [Const, Ref] btVector3 corner00, [Const, Ref] btVector3 corner10, [Const, Ref] btVector3 corner01, [Const, Ref] btVector3 corner11, long resx, long resy, long fixeds, boolean gendiags, float[] tex_coords);
2377
+ btSoftBody CreateEllipsoid([Ref] btSoftBodyWorldInfo worldInfo, [Const, Ref] btVector3 center, [Const, Ref] btVector3 radius, long res);
2378
+ btSoftBody CreateFromTriMesh([Ref] btSoftBodyWorldInfo worldInfo, float[] vertices, long[] triangles, long ntriangles, boolean randomizeConstraints);
2379
+ btSoftBody CreateFromConvexHull([Ref] btSoftBodyWorldInfo worldInfo, [Const] btVector3 vertices, long nvertices, boolean randomizeConstraints);
2380
+ };