/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
1
#ifndef __H_VEC__
2
#define __H_VEC__
3
4
#include "defs.h"
5
6
/** @file
7
 * Contains the definitions of Vectors.
8
 */
9
10
BEGIN_DECLS
11
12
/** @brief
13
 * A Vector of three standard int values.
14
 *
15
 * A Vec3 is considerer a primitive type and as such has no ref/unref memory
16
 * management and no vec_free function. You will have to do that yourself.
17
 *
18
 * @sa vec3_new
19
 * @sa Vec3_16
20
 */
21
typedef struct Vec3 {
22
  int a;
23
  int b;
24
  int c;
25
} Vec3;
26
27
/** @brief
28
 * allocates and initialises a Vec3 pointer.
29
 *
30
 * @sa Vec3
31
 */
32
Vec3 * vec3_new (int a, int b, int c);
33
34
/** @brief
35
 * A Vector of three 16 bit int values.
36
 *
37
 * @sa vec3_16_new
38
 * @sa Vec3
39
 */
40
typedef struct Vec3_16 {
41
  int16_t a;
42
  int16_t b;
43
  int16_t c;
44
} Vec3_16;
45
46
/** @brief
47
 * allocates and initialises a Vec3_16 pointer.
48
 * 
49
 * @sa Vec3_16
50
 */
51
Vec3_16 * vec3_16_new (int16_t a, int16_t b, int16_t c);
52
53
END_DECLS
54
55
#endif /* __H_VEC__ */
56