goat3d

view src/vmath.h @ 0:2918358f5e6d

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 17 Aug 2013 16:10:26 +0300
parents
children
line source
1 #ifndef VMATH_H_
2 #define VMATH_H_
4 class Vector3 {
5 public:
6 float x, y, z;
8 Vector3() : x(0), y(0), z(0) {}
9 Vector3(float x, float y, float z) {
10 this->x = x;
11 this->y = y;
12 this->z = z;
13 }
14 };
16 class Vector4 {
17 public:
18 float x, y, z, w;
20 Vector4() : x(0), y(0), z(0), w(1) {}
21 Vector4(float x, float y, float z, float w) {
22 this->x = x;
23 this->y = y;
24 this->z = z;
25 this->w = w;
26 }
27 };
29 #endif // VMATH_H_