]> git.lizzy.rs Git - shadowclad.git/blob - src/engine/geometry.h
Housekeeping
[shadowclad.git] / src / engine / geometry.h
1 #ifndef GEOMETRY_H_
2 #define GEOMETRY_H_
3
4 #include <GL/gl.h>
5
6 typedef struct Vector3D Vector3D;
7 typedef struct Transform Transform;
8
9 struct Vector3D {
10         float x;
11         float y;
12         float z;
13 };
14
15 struct Transform {
16         GLfloat a1, a2, a3, a4;
17         GLfloat b1, b2, b3, b4;
18         GLfloat c1, c2, c3, c4;
19         GLfloat d1, d2, d3, d4;
20 };
21
22 Transform identity();
23 void translate(Transform* transform, Vector3D vec);
24 Vector3D translationOf(Transform transform);
25
26 #endif // GEOMETRY_H_