3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_PROFILE_H_
9 #define LIBR2C2_PROFILE_H_
12 #include <msp/datafile/objectloader.h>
20 class Loader: public Msp::DataFile::ObjectLoader<Profile>
25 void point(float, float);
29 std::vector<Point> points;
34 void append_point(const Point &);
35 unsigned get_n_points() const { return points.size(); }
36 const Point &get_point(unsigned) const;
37 const Point &get_min_coords() const { return min_coords; }
38 const Point &get_max_coords() const { return max_coords; }
39 float get_width() const { return max_coords.x-min_coords.x; }
40 float get_height() const { return max_coords.y-min_coords.y; }
41 Point get_edge_normal(unsigned) const;