X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fprofile.h;h=fd8c01caa4faadd5f5db727cab5fbda5bc0dca62;hb=54cb832334a83fc266b59e2c9b60ee936db7118f;hp=00132e9d9d8455d73923b54719af21c948fe180f;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/libr2c2/profile.h b/source/libr2c2/profile.h index 00132e9..fd8c01c 100644 --- a/source/libr2c2/profile.h +++ b/source/libr2c2/profile.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef LIBR2C2_PROFILE_H_ #define LIBR2C2_PROFILE_H_ @@ -23,22 +16,29 @@ public: Loader(Profile &); private: void point(float, float); + void smooth_point(float, float); + }; + + struct Vertex + { + Vector pos; + Vector normal; + bool smooth; }; private: - std::vector points; - Point min_coords; - Point max_coords; + std::vector vertices; + Vector min_coords; + Vector max_coords; public: - void append_point(const Point &); - 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; } + void append_vertex(const Vector &, bool); + unsigned get_n_vertices() const { return vertices.size(); } + const Vertex &get_vertex(unsigned) const; + const Vector &get_min_coords() const { return min_coords; } + const Vector &get_max_coords() const { return max_coords; } float get_width() const { return max_coords.x-min_coords.x; } float get_height() const { return max_coords.y-min_coords.y; } - Point get_edge_normal(unsigned) const; }; } // namespace R2C2