2014-12-20 21:34:19 +01:00
|
|
|
#pragma once
|
|
|
|
#include <3ds.h>
|
|
|
|
|
|
|
|
typedef u32 C3D_IVec;
|
|
|
|
|
2015-09-09 01:14:20 +02:00
|
|
|
typedef union
|
2014-12-20 21:34:19 +01:00
|
|
|
{
|
2015-09-09 01:14:20 +02:00
|
|
|
struct { float w, z, y, x; };
|
|
|
|
float c[4];
|
2014-12-20 21:34:19 +01:00
|
|
|
} C3D_FVec;
|
|
|
|
|
|
|
|
// Row-major 4x4 matrix
|
2015-09-09 01:14:20 +02:00
|
|
|
typedef union
|
2014-12-20 21:34:19 +01:00
|
|
|
{
|
2015-09-09 01:14:20 +02:00
|
|
|
C3D_FVec r[4]; // Rows are vectors
|
|
|
|
float m[4*4];
|
2014-12-20 21:34:19 +01:00
|
|
|
} C3D_Mtx;
|
|
|
|
|
|
|
|
static inline C3D_IVec IVec_Pack(u8 x, u8 y, u8 z, u8 w)
|
|
|
|
{
|
|
|
|
return (u32)x | ((u32)y << 8) | ((u32)z << 16) | ((u32)w << 24);
|
|
|
|
}
|