[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / bullet3 / src / Bullet3Collision / NarrowPhaseCollision / shared / b3Collidable.h
1
2 #ifndef B3_COLLIDABLE_H
3 #define B3_COLLIDABLE_H
4
5 #include "Bullet3Common/shared/b3Float4.h"
6 #include "Bullet3Common/shared/b3Quat.h"
7
8 enum b3ShapeTypes
9 {
10         SHAPE_HEIGHT_FIELD = 1,
11
12         SHAPE_CONVEX_HULL = 3,
13         SHAPE_PLANE = 4,
14         SHAPE_CONCAVE_TRIMESH = 5,
15         SHAPE_COMPOUND_OF_CONVEX_HULLS = 6,
16         SHAPE_SPHERE = 7,
17         MAX_NUM_SHAPE_TYPES,
18 };
19
20 typedef struct b3Collidable b3Collidable_t;
21
22 struct b3Collidable
23 {
24         union {
25                 int m_numChildShapes;
26                 int m_bvhIndex;
27         };
28         union {
29                 float m_radius;
30                 int m_compoundBvhIndex;
31         };
32
33         int m_shapeType;
34         union {
35                 int m_shapeIndex;
36                 float m_height;
37         };
38 };
39
40 typedef struct b3GpuChildShape b3GpuChildShape_t;
41 struct b3GpuChildShape
42 {
43         b3Float4 m_childPosition;
44         b3Quat m_childOrientation;
45         union {
46                 int m_shapeIndex;  //used for SHAPE_COMPOUND_OF_CONVEX_HULLS
47                 int m_capsuleAxis;
48         };
49         union {
50                 float m_radius;        //used for childshape of SHAPE_COMPOUND_OF_SPHERES or SHAPE_COMPOUND_OF_CAPSULES
51                 int m_numChildShapes;  //used for compound shape
52         };
53         union {
54                 float m_height;  //used for childshape of SHAPE_COMPOUND_OF_CAPSULES
55                 int m_collidableShapeIndex;
56         };
57         int m_shapeType;
58 };
59
60 struct b3CompoundOverlappingPair
61 {
62         int m_bodyIndexA;
63         int m_bodyIndexB;
64         //      int     m_pairType;
65         int m_childShapeIndexA;
66         int m_childShapeIndexB;
67 };
68
69 #endif  //B3_COLLIDABLE_H