move typedefs to twn_types.h, specify that twn_vec.h is C user only, remove Vec2sh
This commit is contained in:
@ -39,4 +39,42 @@ typedef struct Matrix4 {
|
||||
Vec4 row[4];
|
||||
} Matrix4;
|
||||
|
||||
|
||||
/* a point in some space (integer) */
|
||||
typedef struct Vec2i {
|
||||
_Alignas(8)
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
} Vec2i;
|
||||
|
||||
|
||||
/* a point in some space (floating point) */
|
||||
typedef struct Vec2 {
|
||||
_Alignas(8)
|
||||
float x;
|
||||
float y;
|
||||
} Vec2;
|
||||
|
||||
|
||||
/* a point in some three dimension space (floating point) */
|
||||
/* y goes up, x goes to the right */
|
||||
typedef struct Vec3 {
|
||||
_Alignas(16)
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} Vec3;
|
||||
|
||||
|
||||
/* a point in some three dimension space (floating point) */
|
||||
/* y goes up, x goes to the right */
|
||||
typedef struct Vec4 {
|
||||
_Alignas(16)
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float w;
|
||||
} Vec4;
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user