KallistiOS
git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
vector.h
Go to the documentation of this file.
1
/* KallistiOS ##version##
2
3
dc/vector.h
4
Copyright (C) 2002 Megan Potter
5
6
*/
7
8
#ifndef __DC_VECTOR_H
9
#define __DC_VECTOR_H
10
11
/** \file dc/vector.h
12
\brief Primitive matrix, vector, and point types.
13
\ingroup math_matrices
14
15
This file provides a few primivite data types that are useful for 3D
16
graphics.
17
18
\author Megan Potter
19
*/
20
21
#include <sys/cdefs.h>
22
__BEGIN_DECLS
23
24
/** \addtogroup math_matrices
25
@{
26
*/
27
28
/** \brief Basic 4x4 matrix type.
29
\headerfile dc/vector.h
30
31
\warning
32
This type must always be allocated on 8-byte boundaries,
33
or else the API operating on it will crash on unaligned
34
accesses. Keep this in mind with heap allocation, where
35
you must ensure alignment manually.
36
*/
37
typedef
__attribute__ ((aligned (8))) float
matrix_t
[4][4];
38
39
/** \brief 4-part vector type.
40
\headerfile dc/vector.h
41
*/
42
typedef struct vectorstr {
43
float
x, y, z,
w
;
44
}
vector_t
;
45
46
/** \brief 4-part point type (alias to the vector_t type).
47
\headerfile dc/vector.h
48
*/
49
typedef
vector_t
point_t
;
50
51
/** @} */
52
53
__END_DECLS
54
55
#endif
/* __DC_VECTOR_H */
56
matrix_t
float matrix_t[4][4]
Basic 4x4 matrix type.
Definition
vector.h:37
point_t
vector_t point_t
4-part point type (alias to the vector_t type).
Definition
vector.h:49
vector_t
4-part vector type.
Definition
vector.h:42
vector_t::w
float w
Definition
vector.h:43
kernel
arch
dreamcast
include
dc
vector.h
Generated by
1.12.0