[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / bullet3 / src / Bullet3Common / shared / b3Int4.h
1 #ifndef B3_INT4_H
2 #define B3_INT4_H
3
4 #ifdef __cplusplus
5
6 #include "Bullet3Common/b3Scalar.h"
7
8 B3_ATTRIBUTE_ALIGNED16(struct)
9 b3UnsignedInt4
10 {
11         B3_DECLARE_ALIGNED_ALLOCATOR();
12
13         union {
14                 struct
15                 {
16                         unsigned int x, y, z, w;
17                 };
18                 struct
19                 {
20                         unsigned int s[4];
21                 };
22         };
23 };
24
25 B3_ATTRIBUTE_ALIGNED16(struct)
26 b3Int4
27 {
28         B3_DECLARE_ALIGNED_ALLOCATOR();
29
30         union {
31                 struct
32                 {
33                         int x, y, z, w;
34                 };
35                 struct
36                 {
37                         int s[4];
38                 };
39         };
40 };
41
42 B3_FORCE_INLINE b3Int4 b3MakeInt4(int x, int y, int z, int w = 0)
43 {
44         b3Int4 v;
45         v.s[0] = x;
46         v.s[1] = y;
47         v.s[2] = z;
48         v.s[3] = w;
49         return v;
50 }
51
52 B3_FORCE_INLINE b3UnsignedInt4 b3MakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0)
53 {
54         b3UnsignedInt4 v;
55         v.s[0] = x;
56         v.s[1] = y;
57         v.s[2] = z;
58         v.s[3] = w;
59         return v;
60 }
61
62 #else
63
64 #define b3UnsignedInt4 uint4
65 #define b3Int4 int4
66 #define b3MakeInt4 (int4)
67 #define b3MakeUnsignedInt4 (uint4)
68
69 #endif  //__cplusplus
70
71 #endif  //B3_INT4_H