3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_GEOMETRY_H_
9 #define LIBMARKLIN_GEOMETRY_H_
20 Point(): x(0), y(0), z(0) { }
21 Point(float x_, float y_): x(x_), y(y_), z(0) { }
22 Point(float x_, float y_, float z_): x(x_), y(y_), z(z_) { }
25 inline float distance(const Point &p, const Point &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) { }
37 } // namespace Marklin