summaryrefslogtreecommitdiff
path: root/engine/vector.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-05-23 18:28:50 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-05-23 18:28:50 +0200
commit57bf396ed52510fee5a34e479ca1f671faba2773 (patch)
tree4eb469aad6a2e6f6a06a707893c5fee48667053e /engine/vector.h
parentc478aeeb9b7b40bfd3415500b4886c0c0542bc26 (diff)
Added Vector2.
Diffstat (limited to 'engine/vector.h')
-rw-r--r--engine/vector.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/engine/vector.h b/engine/vector.h
index 3c590c3..179674f 100644
--- a/engine/vector.h
+++ b/engine/vector.h
@@ -1,7 +1,7 @@
#ifndef _VECTOR_H_
#define _VECTOR_H_
-class Vector3 {
+class Vector2 {
public:
union {
float x, r;
@@ -9,14 +9,24 @@ class Vector3 {
union {
float y, g;
};
+
+ Vector2();
+ Vector2(float p1, float p2);
+ Vector2(const Vector2& v);
+
+ Vector2& operator=(const Vector2& v);
+};
+
+class Vector3 : public Vector2 {
+ public:
union {
float z, b;
};
-
+
Vector3();
Vector3(float p1, float p2, float p3);
Vector3(const Vector3& v);
-
+
Vector3& operator=(const Vector3& v);
};