citro3d
1.2.0
include
c3d
types.h
Go to the documentation of this file.
1
#pragma once
2
#ifdef _3DS
3
#include <3ds.h>
4
#else
5
#include <stdbool.h>
6
#include <stdint.h>
7
typedef
uint8_t u8;
8
typedef
uint32_t u32;
9
#endif
10
11
#ifndef CITRO3D_NO_DEPRECATION
12
#define C3D_DEPRECATED __attribute__ ((deprecated))
13
#else
14
#define C3D_DEPRECATED
15
#endif
16
17
typedef
u32
C3D_IVec
;
18
19
static
inline
C3D_IVec
IVec_Pack
(u8 x, u8 y, u8 z, u8 w)
20
{
21
return
(u32)x | ((u32)y << 8) | ((u32)z << 16) | ((u32)w << 24);
22
}
23
36
typedef
union
37
{
41
struct
42
{
43
float
w
;
44
float
z
;
45
float
y
;
46
float
x
;
47
};
48
52
struct
53
{
54
float
r
;
55
float
k
;
56
float
j
;
57
float
i
;
58
};
59
63
float
c[4];
64
}
C3D_FVec
;
65
70
typedef
C3D_FVec
C3D_FQuat
;
71
76
typedef
union
77
{
78
C3D_FVec
r[4];
79
float
m[4*4];
80
}
C3D_Mtx
;
C3D_FQuat
C3D_FVec C3D_FQuat
Definition:
types.h:70
IVec_Pack
static C3D_IVec IVec_Pack(u8 x, u8 y, u8 z, u8 w)
Definition:
types.h:19
C3D_IVec
u32 C3D_IVec
Definition:
types.h:17
C3D_FVec
Float vector.
Definition:
types.h:37
C3D_FVec::x
float x
X-component.
Definition:
types.h:46
C3D_FVec::j
float j
J-component.
Definition:
types.h:56
C3D_FVec::z
float z
Z-component.
Definition:
types.h:44
C3D_FVec::w
float w
W-component.
Definition:
types.h:43
C3D_FVec::k
float k
K-component.
Definition:
types.h:55
C3D_FVec::r
float r
Real component.
Definition:
types.h:54
C3D_FVec::i
float i
I-component.
Definition:
types.h:57
C3D_FVec::y
float y
Y-component.
Definition:
types.h:45
C3D_Mtx
Row-major 4x4 matrix.
Definition:
types.h:77
Generated by
1.9.1