diff options
Diffstat (limited to 'Vertex3d.cpp')
-rw-r--r-- | Vertex3d.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/Vertex3d.cpp b/Vertex3d.cpp deleted file mode 100644 index 16c0e27..0000000 --- a/Vertex3d.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "Vertex3d.h" -#include <math.h> - -float Vertex3d::distanceSq(const Vertex3d &v) const { - return (x - v.x)*(x - v.x) + (y - v.y)*(y - v.y) + (z - v.z)*(z - v.z); -} - -float Vertex3d::distance(const Vertex3d &v) const { - return sqrtf(distanceSq(v)); -} - - -Vertex3d Vertex3d::operator+(const Vertex3d &v) const { - return Vertex3d(x + v.x, y + v.y, z + v.z); -} - -Vertex3d Vertex3d::operator-(const Vertex3d &v) const { - return Vertex3d(x - v.x, y - v.y, z - v.z); -} - -Vertex3d& Vertex3d::operator+=(const Vertex3d &v) { - x += v.x; - y += v.y; - z += v.z; - - return *this; -} - -Vertex3d& Vertex3d::operator-=(const Vertex3d &v) { - x -= v.x; - y -= v.y; - z -= v.z; - - return *this; -} |