blob: 665430d81f00c9eca528ba1089fe114b44a0f074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#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_*/
|