b3Collidable.h 918 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef B3_COLLIDABLE_H
  2. #define B3_COLLIDABLE_H
  3. #include "Bullet3Common/shared/b3Float4.h"
  4. #include "Bullet3Common/shared/b3Quat.h"
  5. enum b3ShapeTypes
  6. {
  7. SHAPE_HEIGHT_FIELD=1,
  8. SHAPE_CONVEX_HULL=3,
  9. SHAPE_PLANE=4,
  10. SHAPE_CONCAVE_TRIMESH=5,
  11. SHAPE_COMPOUND_OF_CONVEX_HULLS=6,
  12. SHAPE_SPHERE=7,
  13. MAX_NUM_SHAPE_TYPES,
  14. };
  15. typedef struct b3Collidable b3Collidable_t;
  16. struct b3Collidable
  17. {
  18. union {
  19. int m_numChildShapes;
  20. int m_bvhIndex;
  21. };
  22. union
  23. {
  24. float m_radius;
  25. int m_compoundBvhIndex;
  26. };
  27. int m_shapeType;
  28. int m_shapeIndex;
  29. };
  30. typedef struct b3GpuChildShape b3GpuChildShape_t;
  31. struct b3GpuChildShape
  32. {
  33. b3Float4 m_childPosition;
  34. b3Quat m_childOrientation;
  35. int m_shapeIndex;
  36. int m_unused0;
  37. int m_unused1;
  38. int m_unused2;
  39. };
  40. struct b3CompoundOverlappingPair
  41. {
  42. int m_bodyIndexA;
  43. int m_bodyIndexB;
  44. // int m_pairType;
  45. int m_childShapeIndexA;
  46. int m_childShapeIndexB;
  47. };
  48. #endif //B3_COLLIDABLE_H