goat3d

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/vmath.h	Sat Aug 17 16:10:26 2013 +0300
     1.3 @@ -0,0 +1,29 @@
     1.4 +#ifndef VMATH_H_
     1.5 +#define VMATH_H_
     1.6 +
     1.7 +class Vector3 {
     1.8 +public:
     1.9 +	float x, y, z;
    1.10 +
    1.11 +	Vector3() : x(0), y(0), z(0) {}
    1.12 +	Vector3(float x, float y, float z) {
    1.13 +		this->x = x;
    1.14 +		this->y = y;
    1.15 +		this->z = z;
    1.16 +	}
    1.17 +};
    1.18 +
    1.19 +class Vector4 {
    1.20 +public:
    1.21 +	float x, y, z, w;
    1.22 +
    1.23 +	Vector4() : x(0), y(0), z(0), w(1) {}
    1.24 +	Vector4(float x, float y, float z, float w) {
    1.25 +		this->x = x;
    1.26 +		this->y = y;
    1.27 +		this->z = z;
    1.28 +		this->w = w;
    1.29 +	}
    1.30 +};
    1.31 +
    1.32 +#endif	// VMATH_H_