summaryrefslogtreecommitdiffstats
path: root/Vertex.h
diff options
context:
space:
mode:
Diffstat (limited to 'Vertex.h')
-rw-r--r--Vertex.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Vertex.h b/Vertex.h
index c82bd59..665430d 100644
--- a/Vertex.h
+++ b/Vertex.h
@@ -10,6 +10,10 @@ class Vertex
float getY() const {return y;}
float getZ() const {return z;}
+ float distanceSq(const Vertex &v) const {
+ return x*v.x + y*v.y + z*v.z;
+ }
+
protected:
float x, y, z;
};