diff options
Diffstat (limited to 'src/model/triangle.h')
-rw-r--r-- | src/model/triangle.h | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/src/model/triangle.h b/src/model/triangle.h index 9d775c4..8f4a6a5 100644 --- a/src/model/triangle.h +++ b/src/model/triangle.h @@ -19,35 +19,51 @@ class Triangle public: /// a new triangle with 3 vertices, a normal, color and a detail flag Triangle(math::Vector3f const &v0, math::Vector3f const &v1, math::Vector3f const &v2, - math::Vector3f const &n, math::Color const & color, bool detail); + math::Vector3f const &normal, math::Color const & color, bool detail); /// delete triangle ~Triangle(); - + /// normal of the triangle - inline math::Vector3f const & normal() const { return triangle_normal; } - - /// color of the triangle - inline math::Color const & color() const { return triangle_color;} - + inline math::Vector3f const & normal() const + { + return triangle_normal; + } + + /// color of the triangle + inline math::Color const & color() const + { + return triangle_color; + } + /// indidcates if this triangle was generated from a detail brush - inline bool detail() const { return triangle_detail; } - + inline bool detail() const + { + return triangle_detail; + } + /// triangle vertex 0 - inline math::Vector3f & v0() { return triangle_v0; } - + inline math::Vector3f & v0() + { + return triangle_v0; + } + /// triangle vertex 1 - inline math::Vector3f & v1() { return triangle_v1; } - + inline math::Vector3f & v1() + { + return triangle_v1; + } + /// triangle vertex 2 - inline math::Vector3f & v2() { return triangle_v2; } + inline math::Vector3f & v2() + { + return triangle_v2; + } private: - + math::Vector3f triangle_v0; - /// triangle vertex 1 math::Vector3f triangle_v1; - /// triangle vertex 2 math::Vector3f triangle_v2; - + math::Vector3f triangle_normal; math::Color triangle_color; bool triangle_detail; |