namespace R2C2 {
-struct Point
+struct Vector
{
float x, y, z;
- Point(): x(0), y(0), z(0) { }
- Point(float x_, float y_): x(x_), y(y_), z(0) { }
- Point(float x_, float y_, float z_): x(x_), y(y_), z(z_) { }
+ Vector(): x(0), y(0), z(0) { }
+ Vector(float x_, float y_): x(x_), y(y_), z(0) { }
+ Vector(float x_, float y_, float z_): x(x_), y(y_), z(z_) { }
};
-inline float distance(const Point &p, const Point &q)
+inline float distance(const Vector &p, const Vector &q)
{ return sqrt((p.x-q.x)*(p.x-q.x) + (p.y-q.y)*(p.y-q.y) + (p.z-q.z)*(p.z-q.z)); }
struct TrackPoint
{
- Point pos;
+ Vector pos;
float dir;
float grade;