summaryrefslogtreecommitdiff
path: root/engine/vector.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-05-21 19:24:51 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-05-21 19:24:51 +0200
commit267bebfc227c94f543a39e2aa75fb101bc06932e (patch)
tree40ad8057634ba80aa19c61f57884982fd59f6b56 /engine/vector.h
parent88b1e9e505dad78fd2c3ff927495d322b11491ca (diff)
Moved engine-sources to seperate subdirectory.
Diffstat (limited to 'engine/vector.h')
-rw-r--r--engine/vector.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/engine/vector.h b/engine/vector.h
new file mode 100644
index 0000000..3c590c3
--- /dev/null
+++ b/engine/vector.h
@@ -0,0 +1,36 @@
+#ifndef _VECTOR_H_
+#define _VECTOR_H_
+
+class Vector3 {
+ public:
+ union {
+ float x, r;
+ };
+ union {
+ float y, g;
+ };
+ union {
+ float z, b;
+ };
+
+ Vector3();
+ Vector3(float p1, float p2, float p3);
+ Vector3(const Vector3& v);
+
+ Vector3& operator=(const Vector3& v);
+};
+
+class Vector4 : public Vector3 {
+ public:
+ union {
+ float w, a;
+ };
+
+ Vector4();
+ Vector4(float p1, float p2, float p3, float p4);
+ Vector4(const Vector4& v);
+
+ Vector4& operator=(const Vector4& v);
+};
+
+#endif