2017-08-01 14:30:58 +02:00
|
|
|
#ifndef B3_INT4_H
|
|
|
|
#define B3_INT4_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
#include "Bullet3Common/b3Scalar.h"
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
B3_ATTRIBUTE_ALIGNED16(struct)
|
|
|
|
b3UnsignedInt4
|
2017-08-01 14:30:58 +02:00
|
|
|
{
|
|
|
|
B3_DECLARE_ALIGNED_ALLOCATOR();
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
union {
|
2017-08-01 14:30:58 +02:00
|
|
|
struct
|
|
|
|
{
|
2019-01-03 14:26:51 +01:00
|
|
|
unsigned int x, y, z, w;
|
2017-08-01 14:30:58 +02:00
|
|
|
};
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned int s[4];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
B3_ATTRIBUTE_ALIGNED16(struct)
|
|
|
|
b3Int4
|
2017-08-01 14:30:58 +02:00
|
|
|
{
|
|
|
|
B3_DECLARE_ALIGNED_ALLOCATOR();
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
union {
|
2017-08-01 14:30:58 +02:00
|
|
|
struct
|
|
|
|
{
|
2019-01-03 14:26:51 +01:00
|
|
|
int x, y, z, w;
|
2017-08-01 14:30:58 +02:00
|
|
|
};
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int s[4];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
B3_FORCE_INLINE b3Int4 b3MakeInt4(int x, int y, int z, int w = 0)
|
|
|
|
{
|
|
|
|
b3Int4 v;
|
2019-01-03 14:26:51 +01:00
|
|
|
v.s[0] = x;
|
|
|
|
v.s[1] = y;
|
|
|
|
v.s[2] = z;
|
|
|
|
v.s[3] = w;
|
2017-08-01 14:30:58 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
B3_FORCE_INLINE b3UnsignedInt4 b3MakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0)
|
|
|
|
{
|
|
|
|
b3UnsignedInt4 v;
|
2019-01-03 14:26:51 +01:00
|
|
|
v.s[0] = x;
|
|
|
|
v.s[1] = y;
|
|
|
|
v.s[2] = z;
|
|
|
|
v.s[3] = w;
|
2017-08-01 14:30:58 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define b3UnsignedInt4 uint4
|
|
|
|
#define b3Int4 int4
|
|
|
|
#define b3MakeInt4 (int4)
|
|
|
|
#define b3MakeUnsignedInt4 (uint4)
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
#endif //__cplusplus
|
2017-08-01 14:30:58 +02:00
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
#endif //B3_INT4_H
|