summaryrefslogtreecommitdiffstats
path: root/Vertex3d.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-12-14 03:47:03 +0100
committerneoraider <devnull@localhost>2007-12-14 03:47:03 +0100
commita8c1d6168797526b9d24bc8c86f2578f3be59fa8 (patch)
tree8515976a634b788d99b2c894757a0b4ecbb6fa6a /Vertex3d.h
parentd82c597917d8ef5866c7a83d0c101f423a2ac05d (diff)
downloadzoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.tar
zoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.zip
zoomedit: Verallgemeinerte Level-Objekte implementiert.
Diffstat (limited to 'Vertex3d.h')
-rw-r--r--Vertex3d.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Vertex3d.h b/Vertex3d.h
new file mode 100644
index 0000000..faad420
--- /dev/null
+++ b/Vertex3d.h
@@ -0,0 +1,33 @@
+#ifndef VERTEX3D_H_
+#define VERTEX3D_H_
+
+class Vertex3d {
+ private:
+ float x, y, z;
+
+ public:
+ Vertex3d() {x = y = z = 0.0;}
+ Vertex3d(float x, float y, float z) {this->x = x; this->y = y; this->z = z;}
+
+ float getX() const {return x;}
+ void setX(float x) {this->x = x;}
+
+ float getY() const {return y;}
+ void setY(float y) {this->y = y;}
+
+ float getZ() const {return z;}
+ void setZ(float z) {this->z = z;}
+
+ void setLocation(float x, float y, float z) {this->x = x; this->y = y; this->z = z;}
+
+ float distanceSq(const Vertex3d &v) const;
+ float distance(const Vertex3d &v) const;
+
+ Vertex3d operator+(const Vertex3d &v) const;
+ Vertex3d operator-(const Vertex3d &v) const;
+
+ Vertex3d& operator+=(const Vertex3d &v);
+ Vertex3d& operator-=(const Vertex3d &v);
+};
+
+#endif /*VERTEX3D_H_*/