diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-09 21:11:55 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-09 21:11:55 +0000 |
commit | bbd04914749b2e3918796fe331daf649b06163ea (patch) | |
tree | 0139a4024950ecc5533fd7018ee35942d2ba2680 /src/model/triangle.h | |
parent | 4f576711828f35179dc5d28cfda93eff47e80a74 (diff) |
adds r_normals cvar, read normals from .ase models
Diffstat (limited to 'src/model/triangle.h')
-rw-r--r-- | src/model/triangle.h | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/src/model/triangle.h b/src/model/triangle.h index 27abeed..fe1c720 100644 --- a/src/model/triangle.h +++ b/src/model/triangle.h @@ -17,24 +17,45 @@ namespace model class Triangle { public: - /// a new triangle with 3 vertices, a normal and detail flag - Triangle(math::Vector3f const &v0, math::Vector3f const &v1, math::Vector3f const &v2, - math::Vector3f const &normal, bool detail); + /** + * @brief default constructor + */ + Triangle(); /** - * @brief a new triangle with 3 vertices with normals and a face normal + * @brief copy constructor + */ + Triangle(const Triangle &other); + + /** + * @brief a new triangle with 3 vertices * this constructor sets the detail flag to false */ - Triangle( math::Vector3f const &v0, math::Vector3f const &n0, - math::Vector3f const &v1, math::Vector3f const &n1, - math::Vector3f const &v2, math::Vector3f const &n2, - math::Vector3f const &normal); + Triangle(math::Vector3f const &v0, math::Vector3f const &v1, math::Vector3f const &v2); + + /// a new triangle with 3 vertices, a normal and detail flag + Triangle(math::Vector3f const &v0, math::Vector3f const &v1, math::Vector3f const &v2, + math::Vector3f const &normal, bool detail); /// delete triangle ~Triangle(); + /** + * @brief assignment + */ + void assign(const Triangle &other); + + /** + * @brief assignment oeprator + */ + inline const Triangle & operator=(const Triangle &other) + { + assign(other); + return (*this); + } + /// normal of the triangle - inline math::Vector3f const & normal() const + inline math::Vector3f & normal() { return triangle_normal; } |