 Timestamp:
 Jan 19, 2011, 1:34:12 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/matrix.h
r221 r232 17 17 #define __DH_MATRIX_H__ 18 18 19 struct Float219 template <typename T> struct Vector2 20 20 { 21 Float2() { x = y = 0.0f; }22 Float2(float _x, float_y) { x = _x; y = _y; }21 Vector2() { x = y = 0; } 22 Vector2(T _x, T _y) { x = _x; y = _y; } 23 23 24 float x, y; 24 union { T x; T a; T i; }; 25 union { T y; T b; T j; }; 25 26 }; 26 27 27 struct Float3 28 typedef Vector2<float> Float2; 29 typedef Vector2<int> Int2; 30 31 template <typename T> struct Vector3 28 32 { 29 Float3() { x = y = z = 0.0f; }30 Float3(float _x, float _y, float_z) { x = _x; y = _y; z = _z; }33 Vector3() { x = y = z = 0; } 34 Vector3(T _x, T _y, T _z) { x = _x; y = _y; z = _z; } 31 35 32 float x, y, z; 36 union { T x; T a; T i; }; 37 union { T y; T b; T j; }; 38 union { T z; T c; T k; }; 33 39 }; 40 41 typedef Vector3<float> Float3; 42 typedef Vector3<int> Int3; 34 43 35 44 #endif // __DH_MATRIX_H__
Note: See TracChangeset
for help on using the changeset viewer.