summaryrefslogtreecommitdiffstats
path: root/thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-11-05 09:25:33 +0100
committerGitHub <noreply@github.com>2017-11-05 09:25:33 +0100
commita89fa34c21103430b1d140ee04c3ae6a433d77ce (patch)
tree9ecfb36702c2044937c2063f4ef09da62bd7ca1f /thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h
parentf7a41c1e309226bd0deb6381e71a5ce005cbe4ef (diff)
parentfb4871c919571d719d27738cc4d7db496a575b57 (diff)
downloadredot-engine-a89fa34c21103430b1d140ee04c3ae6a433d77ce.tar.gz
Merge pull request #12641 from AndreaCatania/bullet
Bullet physics wrapper
Diffstat (limited to 'thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h')
-rw-r--r--thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h b/thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h
new file mode 100644
index 0000000000..aa02d6beef
--- /dev/null
+++ b/thirdparty/bullet/src/Bullet3Common/shared/b3Int4.h
@@ -0,0 +1,68 @@
+#ifndef B3_INT4_H
+#define B3_INT4_H
+
+#ifdef __cplusplus
+
+#include "Bullet3Common/b3Scalar.h"
+
+
+B3_ATTRIBUTE_ALIGNED16(struct) b3UnsignedInt4
+{
+ B3_DECLARE_ALIGNED_ALLOCATOR();
+
+ union
+ {
+ struct
+ {
+ unsigned int x,y,z,w;
+ };
+ struct
+ {
+ unsigned int s[4];
+ };
+ };
+};
+
+B3_ATTRIBUTE_ALIGNED16(struct) b3Int4
+{
+ B3_DECLARE_ALIGNED_ALLOCATOR();
+
+ union
+ {
+ struct
+ {
+ int x,y,z,w;
+ };
+ struct
+ {
+ int s[4];
+ };
+ };
+};
+
+B3_FORCE_INLINE b3Int4 b3MakeInt4(int x, int y, int z, int w = 0)
+{
+ b3Int4 v;
+ v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
+ return v;
+}
+
+B3_FORCE_INLINE b3UnsignedInt4 b3MakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0)
+{
+ b3UnsignedInt4 v;
+ v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
+ return v;
+}
+
+#else
+
+
+#define b3UnsignedInt4 uint4
+#define b3Int4 int4
+#define b3MakeInt4 (int4)
+#define b3MakeUnsignedInt4 (uint4)
+
+
+#endif //__cplusplus
+
+#endif //B3_INT4_H