-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.h
62 lines (52 loc) · 848 Bytes
/
structs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//structures
//typedefs
#ifndef _STRUCTS_H
#define _STRUCTS_H
typedef struct rgbcolor_struct
{
int r;
int g;
int b;
} rgbcolor;
typedef struct vector_struct
{
double x;
double y;
double z;
} vector;
typedef struct line_struct
{
vector point;
vector direction;
} line;
typedef struct plane_struct
{
vector pointA;
vector pointB;
vector pointC;
vector pointD;
vector normal;
rgbcolor color;
} plane;
typedef struct line_segment_struct
{
vector pointA;
vector pointB;
rgbcolor color;
} line_segment;
typedef struct face
{
vector vertices[3];
rgbcolor color;
} face_t;
typedef struct model
{
int facec; //face count
face_t *faces;
} model_t;
typedef struct bounding_box
{
vector pointA;
vector pointB;
} bounding_box_t; //UNUSED
#endif