#ifndef _VERTEX_H_ #define _VERTEX_H_ class Vertex { public: Vertex(float x0 = 0, float y0 = 0, float z0 = 0) : x(x0), y(y0), z(z0) {} float getX() const {return x;} 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; }; #endif /*_VERTEX_H_*/