3 This file is part of R²C²
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_GEOMETRY_H_
9 #define LIBR2C2_GEOMETRY_H_
20 Vector(): x(0), y(0), z(0) { }
21 Vector(float x_, float y_): x(x_), y(y_), z(0) { }
22 Vector(float x_, float y_, float z_): x(x_), y(y_), z(z_) { }
25 inline float distance(const Vector &p, const Vector &q)
26 { 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)); }
34 TrackPoint(): dir(0), grade(0) { }