1 /* Copyright (C) 2011 Erwin Coumans & Charlie C
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 * 2. Altered source versions must be plainly marked as such, and must not be
16 * misrepresented as being the original software.
17 * 3. This notice may not be removed or altered from any source distribution.
19 // Auto generated from Bullet/Extras/HeaderGenerator/bulletGenerate.py
22 namespace Bullet3SerializeBullet2
24 // put an empty struct in the case
25 typedef struct bInvalidHandle
31 class b3PhysicsSystem;
33 class b3Vector3FloatData;
34 class b3Vector3DoubleData;
35 class b3Matrix3x3FloatData;
36 class b3Matrix3x3DoubleData;
37 class b3TransformFloatData;
38 class b3TransformDoubleData;
39 class b3BvhSubtreeInfoData;
40 class b3OptimizedBvhNodeFloatData;
41 class b3OptimizedBvhNodeDoubleData;
42 class b3QuantizedBvhNodeData;
43 class b3QuantizedBvhFloatData;
44 class b3QuantizedBvhDoubleData;
45 class b3CollisionShapeData;
46 class b3StaticPlaneShapeData;
47 class b3ConvexInternalShapeData;
48 class b3PositionAndRadius;
49 class b3MultiSphereShapeData;
51 class b3ShortIntIndexData;
52 class b3ShortIntIndexTripletData;
53 class b3CharIndexTripletData;
55 class b3StridingMeshInterfaceData;
56 class b3TriangleMeshShapeData;
57 class b3ScaledTriangleMeshShapeData;
58 class b3CompoundShapeChildData;
59 class b3CompoundShapeData;
60 class b3CylinderShapeData;
61 class b3CapsuleShapeData;
62 class b3TriangleInfoData;
63 class b3TriangleInfoMapData;
64 class b3GImpactMeshShapeData;
65 class b3ConvexHullShapeData;
66 class b3CollisionObjectDoubleData;
67 class b3CollisionObjectFloatData;
68 class b3DynamicsWorldDoubleData;
69 class b3DynamicsWorldFloatData;
70 class b3RigidBodyFloatData;
71 class b3RigidBodyDoubleData;
72 class b3ConstraintInfo1;
73 class b3TypedConstraintData;
74 class b3Point2PointConstraintFloatData;
75 class b3Point2PointConstraintDoubleData;
76 class b3HingeConstraintDoubleData;
77 class b3HingeConstraintFloatData;
78 class b3ConeTwistConstraintData;
79 class b3Generic6DofConstraintData;
80 class b3Generic6DofSpringConstraintData;
81 class b3SliderConstraintData;
82 class b3ContactSolverInfoDoubleData;
83 class b3ContactSolverInfoFloatData;
84 class SoftBodyMaterialData;
85 class SoftBodyNodeData;
86 class SoftBodyLinkData;
87 class SoftBodyFaceData;
88 class SoftBodyTetraData;
89 class SoftRigidAnchorData;
90 class SoftBodyConfigData;
91 class SoftBodyPoseData;
92 class SoftBodyClusterData;
93 class b3SoftBodyJointData;
94 class b3SoftBodyFloatData;
95 // -------------------------------------------------- //
104 // -------------------------------------------------- //
105 class b3PhysicsSystem
108 PointerArray m_collisionShapes;
109 PointerArray m_collisionObjects;
110 PointerArray m_constraints;
113 // -------------------------------------------------- //
121 // -------------------------------------------------- //
122 class b3Vector3FloatData
128 // -------------------------------------------------- //
129 class b3Vector3DoubleData
135 // -------------------------------------------------- //
136 class b3Matrix3x3FloatData
139 b3Vector3FloatData m_el[3];
142 // -------------------------------------------------- //
143 class b3Matrix3x3DoubleData
146 b3Vector3DoubleData m_el[3];
149 // -------------------------------------------------- //
150 class b3TransformFloatData
153 b3Matrix3x3FloatData m_basis;
154 b3Vector3FloatData m_origin;
157 // -------------------------------------------------- //
158 class b3TransformDoubleData
161 b3Matrix3x3DoubleData m_basis;
162 b3Vector3DoubleData m_origin;
165 // -------------------------------------------------- //
166 class b3BvhSubtreeInfoData
171 short m_quantizedAabbMin[3];
172 short m_quantizedAabbMax[3];
175 // -------------------------------------------------- //
176 class b3OptimizedBvhNodeFloatData
179 b3Vector3FloatData m_aabbMinOrg;
180 b3Vector3FloatData m_aabbMaxOrg;
187 // -------------------------------------------------- //
188 class b3OptimizedBvhNodeDoubleData
191 b3Vector3DoubleData m_aabbMinOrg;
192 b3Vector3DoubleData m_aabbMaxOrg;
199 // -------------------------------------------------- //
200 class b3QuantizedBvhNodeData
203 short m_quantizedAabbMin[3];
204 short m_quantizedAabbMax[3];
205 int m_escapeIndexOrTriangleIndex;
208 // -------------------------------------------------- //
209 class b3QuantizedBvhFloatData
212 b3Vector3FloatData m_bvhAabbMin;
213 b3Vector3FloatData m_bvhAabbMax;
214 b3Vector3FloatData m_bvhQuantization;
216 int m_useQuantization;
217 int m_numContiguousLeafNodes;
218 int m_numQuantizedContiguousNodes;
219 b3OptimizedBvhNodeFloatData *m_contiguousNodesPtr;
220 b3QuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
221 b3BvhSubtreeInfoData *m_subTreeInfoPtr;
223 int m_numSubtreeHeaders;
226 // -------------------------------------------------- //
227 class b3QuantizedBvhDoubleData
230 b3Vector3DoubleData m_bvhAabbMin;
231 b3Vector3DoubleData m_bvhAabbMax;
232 b3Vector3DoubleData m_bvhQuantization;
234 int m_useQuantization;
235 int m_numContiguousLeafNodes;
236 int m_numQuantizedContiguousNodes;
237 b3OptimizedBvhNodeDoubleData *m_contiguousNodesPtr;
238 b3QuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
240 int m_numSubtreeHeaders;
241 b3BvhSubtreeInfoData *m_subTreeInfoPtr;
244 // -------------------------------------------------- //
245 class b3CollisionShapeData
253 // -------------------------------------------------- //
254 class b3StaticPlaneShapeData
257 b3CollisionShapeData m_collisionShapeData;
258 b3Vector3FloatData m_localScaling;
259 b3Vector3FloatData m_planeNormal;
260 float m_planeConstant;
264 // -------------------------------------------------- //
265 class b3ConvexInternalShapeData
268 b3CollisionShapeData m_collisionShapeData;
269 b3Vector3FloatData m_localScaling;
270 b3Vector3FloatData m_implicitShapeDimensions;
271 float m_collisionMargin;
275 // -------------------------------------------------- //
276 class b3PositionAndRadius
279 b3Vector3FloatData m_pos;
283 // -------------------------------------------------- //
284 class b3MultiSphereShapeData
287 b3ConvexInternalShapeData m_convexInternalShapeData;
288 b3PositionAndRadius *m_localPositionArrayPtr;
289 int m_localPositionArraySize;
293 // -------------------------------------------------- //
300 // -------------------------------------------------- //
301 class b3ShortIntIndexData
308 // -------------------------------------------------- //
309 class b3ShortIntIndexTripletData
316 // -------------------------------------------------- //
317 class b3CharIndexTripletData
324 // -------------------------------------------------- //
328 b3Vector3FloatData *m_vertices3f;
329 b3Vector3DoubleData *m_vertices3d;
330 b3IntIndexData *m_indices32;
331 b3ShortIntIndexTripletData *m_3indices16;
332 b3CharIndexTripletData *m_3indices8;
333 b3ShortIntIndexData *m_indices16;
338 // -------------------------------------------------- //
339 class b3StridingMeshInterfaceData
342 b3MeshPartData *m_meshPartsPtr;
343 b3Vector3FloatData m_scaling;
348 // -------------------------------------------------- //
349 class b3TriangleMeshShapeData
352 b3CollisionShapeData m_collisionShapeData;
353 b3StridingMeshInterfaceData m_meshInterface;
354 b3QuantizedBvhFloatData *m_quantizedFloatBvh;
355 b3QuantizedBvhDoubleData *m_quantizedDoubleBvh;
356 b3TriangleInfoMapData *m_triangleInfoMap;
357 float m_collisionMargin;
361 // -------------------------------------------------- //
362 class b3ScaledTriangleMeshShapeData
365 b3TriangleMeshShapeData m_trimeshShapeData;
366 b3Vector3FloatData m_localScaling;
369 // -------------------------------------------------- //
370 class b3CompoundShapeChildData
373 b3TransformFloatData m_transform;
374 b3CollisionShapeData *m_childShape;
375 int m_childShapeType;
379 // -------------------------------------------------- //
380 class b3CompoundShapeData
383 b3CollisionShapeData m_collisionShapeData;
384 b3CompoundShapeChildData *m_childShapePtr;
385 int m_numChildShapes;
386 float m_collisionMargin;
389 // -------------------------------------------------- //
390 class b3CylinderShapeData
393 b3ConvexInternalShapeData m_convexInternalShapeData;
398 // -------------------------------------------------- //
399 class b3CapsuleShapeData
402 b3ConvexInternalShapeData m_convexInternalShapeData;
407 // -------------------------------------------------- //
408 class b3TriangleInfoData
412 float m_edgeV0V1Angle;
413 float m_edgeV1V2Angle;
414 float m_edgeV2V0Angle;
417 // -------------------------------------------------- //
418 class b3TriangleInfoMapData
423 b3TriangleInfoData *m_valueArrayPtr;
425 float m_convexEpsilon;
426 float m_planarEpsilon;
427 float m_equalVertexThreshold;
428 float m_edgeDistanceThreshold;
429 float m_zeroAreaThreshold;
437 // -------------------------------------------------- //
438 class b3GImpactMeshShapeData
441 b3CollisionShapeData m_collisionShapeData;
442 b3StridingMeshInterfaceData m_meshInterface;
443 b3Vector3FloatData m_localScaling;
444 float m_collisionMargin;
445 int m_gimpactSubType;
448 // -------------------------------------------------- //
449 class b3ConvexHullShapeData
452 b3ConvexInternalShapeData m_convexInternalShapeData;
453 b3Vector3FloatData *m_unscaledPointsFloatPtr;
454 b3Vector3DoubleData *m_unscaledPointsDoublePtr;
455 int m_numUnscaledPoints;
459 // -------------------------------------------------- //
460 class b3CollisionObjectDoubleData
463 void *m_broadphaseHandle;
464 void *m_collisionShape;
465 b3CollisionShapeData *m_rootCollisionShape;
467 b3TransformDoubleData m_worldTransform;
468 b3TransformDoubleData m_interpolationWorldTransform;
469 b3Vector3DoubleData m_interpolationLinearVelocity;
470 b3Vector3DoubleData m_interpolationAngularVelocity;
471 b3Vector3DoubleData m_anisotropicFriction;
472 double m_contactProcessingThreshold;
473 double m_deactivationTime;
475 double m_rollingFriction;
476 double m_restitution;
477 double m_hitFraction;
478 double m_ccdSweptSphereRadius;
479 double m_ccdMotionThreshold;
480 int m_hasAnisotropicFriction;
481 int m_collisionFlags;
484 int m_activationState1;
486 int m_checkCollideWith;
490 // -------------------------------------------------- //
491 class b3CollisionObjectFloatData
494 void *m_broadphaseHandle;
495 void *m_collisionShape;
496 b3CollisionShapeData *m_rootCollisionShape;
498 b3TransformFloatData m_worldTransform;
499 b3TransformFloatData m_interpolationWorldTransform;
500 b3Vector3FloatData m_interpolationLinearVelocity;
501 b3Vector3FloatData m_interpolationAngularVelocity;
502 b3Vector3FloatData m_anisotropicFriction;
503 float m_contactProcessingThreshold;
504 float m_deactivationTime;
506 float m_rollingFriction;
509 float m_ccdSweptSphereRadius;
510 float m_ccdMotionThreshold;
511 int m_hasAnisotropicFriction;
512 int m_collisionFlags;
515 int m_activationState1;
517 int m_checkCollideWith;
521 // -------------------------------------------------- //
522 class b3RigidBodyFloatData
525 b3CollisionObjectFloatData m_collisionObjectData;
526 b3Matrix3x3FloatData m_invInertiaTensorWorld;
527 b3Vector3FloatData m_linearVelocity;
528 b3Vector3FloatData m_angularVelocity;
529 b3Vector3FloatData m_angularFactor;
530 b3Vector3FloatData m_linearFactor;
531 b3Vector3FloatData m_gravity;
532 b3Vector3FloatData m_gravity_acceleration;
533 b3Vector3FloatData m_invInertiaLocal;
534 b3Vector3FloatData m_totalForce;
535 b3Vector3FloatData m_totalTorque;
537 float m_linearDamping;
538 float m_angularDamping;
539 float m_additionalDampingFactor;
540 float m_additionalLinearDampingThresholdSqr;
541 float m_additionalAngularDampingThresholdSqr;
542 float m_additionalAngularDampingFactor;
543 float m_linearSleepingThreshold;
544 float m_angularSleepingThreshold;
545 int m_additionalDamping;
548 // -------------------------------------------------- //
549 class b3RigidBodyDoubleData
552 b3CollisionObjectDoubleData m_collisionObjectData;
553 b3Matrix3x3DoubleData m_invInertiaTensorWorld;
554 b3Vector3DoubleData m_linearVelocity;
555 b3Vector3DoubleData m_angularVelocity;
556 b3Vector3DoubleData m_angularFactor;
557 b3Vector3DoubleData m_linearFactor;
558 b3Vector3DoubleData m_gravity;
559 b3Vector3DoubleData m_gravity_acceleration;
560 b3Vector3DoubleData m_invInertiaLocal;
561 b3Vector3DoubleData m_totalForce;
562 b3Vector3DoubleData m_totalTorque;
563 double m_inverseMass;
564 double m_linearDamping;
565 double m_angularDamping;
566 double m_additionalDampingFactor;
567 double m_additionalLinearDampingThresholdSqr;
568 double m_additionalAngularDampingThresholdSqr;
569 double m_additionalAngularDampingFactor;
570 double m_linearSleepingThreshold;
571 double m_angularSleepingThreshold;
572 int m_additionalDamping;
576 // -------------------------------------------------- //
577 class b3ConstraintInfo1
580 int m_numConstraintRows;
584 // -------------------------------------------------- //
585 class b3TypedConstraintData
588 bInvalidHandle *m_rbA;
589 bInvalidHandle *m_rbB;
592 int m_userConstraintType;
593 int m_userConstraintId;
595 float m_appliedImpulse;
597 int m_disableCollisionsBetweenLinkedBodies;
598 int m_overrideNumSolverIterations;
599 float m_breakingImpulseThreshold;
603 // -------------------------------------------------- //
604 class b3Point2PointConstraintFloatData
607 b3TypedConstraintData m_typeConstraintData;
608 b3Vector3FloatData m_pivotInA;
609 b3Vector3FloatData m_pivotInB;
612 // -------------------------------------------------- //
613 class b3Point2PointConstraintDoubleData
616 b3TypedConstraintData m_typeConstraintData;
617 b3Vector3DoubleData m_pivotInA;
618 b3Vector3DoubleData m_pivotInB;
621 // -------------------------------------------------- //
622 class b3HingeConstraintDoubleData
625 b3TypedConstraintData m_typeConstraintData;
626 b3TransformDoubleData m_rbAFrame;
627 b3TransformDoubleData m_rbBFrame;
628 int m_useReferenceFrameA;
630 int m_enableAngularMotor;
631 float m_motorTargetVelocity;
632 float m_maxMotorImpulse;
635 float m_limitSoftness;
637 float m_relaxationFactor;
640 // -------------------------------------------------- //
641 class b3HingeConstraintFloatData
644 b3TypedConstraintData m_typeConstraintData;
645 b3TransformFloatData m_rbAFrame;
646 b3TransformFloatData m_rbBFrame;
647 int m_useReferenceFrameA;
649 int m_enableAngularMotor;
650 float m_motorTargetVelocity;
651 float m_maxMotorImpulse;
654 float m_limitSoftness;
656 float m_relaxationFactor;
659 // -------------------------------------------------- //
660 class b3ConeTwistConstraintData
663 b3TypedConstraintData m_typeConstraintData;
664 b3TransformFloatData m_rbAFrame;
665 b3TransformFloatData m_rbBFrame;
669 float m_limitSoftness;
671 float m_relaxationFactor;
676 // -------------------------------------------------- //
677 class b3Generic6DofConstraintData
680 b3TypedConstraintData m_typeConstraintData;
681 b3TransformFloatData m_rbAFrame;
682 b3TransformFloatData m_rbBFrame;
683 b3Vector3FloatData m_linearUpperLimit;
684 b3Vector3FloatData m_linearLowerLimit;
685 b3Vector3FloatData m_angularUpperLimit;
686 b3Vector3FloatData m_angularLowerLimit;
687 int m_useLinearReferenceFrameA;
688 int m_useOffsetForConstraintFrame;
691 // -------------------------------------------------- //
692 class b3Generic6DofSpringConstraintData
695 b3Generic6DofConstraintData m_6dofData;
696 int m_springEnabled[6];
697 float m_equilibriumPoint[6];
698 float m_springStiffness[6];
699 float m_springDamping[6];
702 // -------------------------------------------------- //
703 class b3SliderConstraintData
706 b3TypedConstraintData m_typeConstraintData;
707 b3TransformFloatData m_rbAFrame;
708 b3TransformFloatData m_rbBFrame;
709 float m_linearUpperLimit;
710 float m_linearLowerLimit;
711 float m_angularUpperLimit;
712 float m_angularLowerLimit;
713 int m_useLinearReferenceFrameA;
714 int m_useOffsetForConstraintFrame;
717 // -------------------------------------------------- //
718 class b3ContactSolverInfoDoubleData
725 double m_restitution;
726 double m_maxErrorReduction;
731 double m_splitImpulsePenetrationThreshold;
732 double m_splitImpulseTurnErp;
734 double m_warmstartingFactor;
735 double m_maxGyroscopicForce;
736 double m_singleAxisRollingFrictionThreshold;
739 int m_restingContactRestitutionThreshold;
740 int m_minimumSolverBatchSize;
745 // -------------------------------------------------- //
746 class b3ContactSolverInfoFloatData
754 float m_maxErrorReduction;
759 float m_splitImpulsePenetrationThreshold;
760 float m_splitImpulseTurnErp;
762 float m_warmstartingFactor;
763 float m_maxGyroscopicForce;
764 float m_singleAxisRollingFrictionThreshold;
767 int m_restingContactRestitutionThreshold;
768 int m_minimumSolverBatchSize;
773 // -------------------------------------------------- //
774 class b3DynamicsWorldDoubleData
777 b3ContactSolverInfoDoubleData m_solverInfo;
778 b3Vector3DoubleData m_gravity;
781 // -------------------------------------------------- //
782 class b3DynamicsWorldFloatData
785 b3ContactSolverInfoFloatData m_solverInfo;
786 b3Vector3FloatData m_gravity;
789 // -------------------------------------------------- //
790 class SoftBodyMaterialData
793 float m_linearStiffness;
794 float m_angularStiffness;
795 float m_volumeStiffness;
799 // -------------------------------------------------- //
800 class SoftBodyNodeData
803 SoftBodyMaterialData *m_material;
804 b3Vector3FloatData m_position;
805 b3Vector3FloatData m_previousPosition;
806 b3Vector3FloatData m_velocity;
807 b3Vector3FloatData m_accumulatedForce;
808 b3Vector3FloatData m_normal;
815 // -------------------------------------------------- //
816 class SoftBodyLinkData
819 SoftBodyMaterialData *m_material;
820 int m_nodeIndices[2];
825 // -------------------------------------------------- //
826 class SoftBodyFaceData
829 b3Vector3FloatData m_normal;
830 SoftBodyMaterialData *m_material;
831 int m_nodeIndices[3];
835 // -------------------------------------------------- //
836 class SoftBodyTetraData
839 b3Vector3FloatData m_c0[4];
840 SoftBodyMaterialData *m_material;
841 int m_nodeIndices[4];
848 // -------------------------------------------------- //
849 class SoftRigidAnchorData
852 b3Matrix3x3FloatData m_c0;
853 b3Vector3FloatData m_c1;
854 b3Vector3FloatData m_localFrame;
855 bInvalidHandle *m_rigidBody;
860 // -------------------------------------------------- //
861 class SoftBodyConfigData
871 float m_dynamicFriction;
873 float m_rigidContactHardness;
874 float m_kineticContactHardness;
875 float m_softContactHardness;
876 float m_anchorHardness;
877 float m_softRigidClusterHardness;
878 float m_softKineticClusterHardness;
879 float m_softSoftClusterHardness;
880 float m_softRigidClusterImpulseSplit;
881 float m_softKineticClusterImpulseSplit;
882 float m_softSoftClusterImpulseSplit;
885 int m_velocityIterations;
886 int m_positionIterations;
887 int m_driftIterations;
888 int m_clusterIterations;
889 int m_collisionFlags;
892 // -------------------------------------------------- //
893 class SoftBodyPoseData
896 b3Matrix3x3FloatData m_rot;
897 b3Matrix3x3FloatData m_scale;
898 b3Matrix3x3FloatData m_aqq;
899 b3Vector3FloatData m_com;
900 b3Vector3FloatData *m_positions;
910 // -------------------------------------------------- //
911 class SoftBodyClusterData
914 b3TransformFloatData m_framexform;
915 b3Matrix3x3FloatData m_locii;
916 b3Matrix3x3FloatData m_invwi;
917 b3Vector3FloatData m_com;
918 b3Vector3FloatData m_vimpulses[2];
919 b3Vector3FloatData m_dimpulses[2];
920 b3Vector3FloatData m_lv;
921 b3Vector3FloatData m_av;
922 b3Vector3FloatData *m_framerefs;
936 float m_maxSelfCollisionImpulse;
937 float m_selfCollisionImpulseFactor;
938 int m_containsAnchor;
943 // -------------------------------------------------- //
944 class b3SoftBodyJointData
949 b3Vector3FloatData m_refs[2];
954 b3Vector3FloatData m_relPosition[2];
961 // -------------------------------------------------- //
962 class b3SoftBodyFloatData
965 b3CollisionObjectFloatData m_collisionObjectData;
966 SoftBodyPoseData *m_pose;
967 SoftBodyMaterialData **m_materials;
968 SoftBodyNodeData *m_nodes;
969 SoftBodyLinkData *m_links;
970 SoftBodyFaceData *m_faces;
971 SoftBodyTetraData *m_tetrahedra;
972 SoftRigidAnchorData *m_anchors;
973 SoftBodyClusterData *m_clusters;
974 b3SoftBodyJointData *m_joints;
983 SoftBodyConfigData m_config;
986 } // namespace Bullet3SerializeBullet2
987 #endif //__BULLET2_H__