X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fprofile.h;fp=source%2Flibmarklin%2Fprofile.h;h=3b194c8d39870650529d210b75ff05c31aa7c5b7;hb=7e382cc3cad8c4f6945b0c9d89e2ca917b42b740;hp=0000000000000000000000000000000000000000;hpb=446fa7ad737b431621be53a23360ea3bbe417fe5;p=r2c2.git diff --git a/source/libmarklin/profile.h b/source/libmarklin/profile.h new file mode 100644 index 0000000..3b194c8 --- /dev/null +++ b/source/libmarklin/profile.h @@ -0,0 +1,44 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2010 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + +#ifndef LIBMARKLIN_PROFILE_H_ +#define LIBMARKLIN_PROFILE_H_ + +#include +#include +#include "geometry.h" + +namespace Marklin { + +class Profile +{ +public: + class Loader: public Msp::DataFile::ObjectLoader + { + public: + Loader(Profile &); + private: + virtual void finish(); + void point(float, float); + }; + +private: + std::vector points; + Point min_coords; + Point max_coords; + +public: + unsigned get_n_points() const { return points.size(); } + const Point &get_point(unsigned) const; + const Point &get_min_coords() const { return min_coords; } + const Point &get_max_coords() const { return max_coords; } + Point get_edge_normal(unsigned) const; +}; + +} // namespace Marklin + +#endif