Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-23 15:16:56 +0000
committerStijn Buys <ingar@osirion.org>2008-07-23 15:16:56 +0000
commit426b766efbccdd8f5715de9526464db251fac30c (patch)
treef1abfea7c1d4d4f1e97bd534d447cb6907576e2f /src/model/triangle.h
parent67517585e9b55967f5236ed5ebca77173eb2f2e3 (diff)
preparing for fragment rendering
Diffstat (limited to 'src/model/triangle.h')
-rw-r--r--src/model/triangle.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/model/triangle.h b/src/model/triangle.h
index 58e25e4..9d775c4 100644
--- a/src/model/triangle.h
+++ b/src/model/triangle.h
@@ -18,25 +18,36 @@ 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 *color=0, bool detail=false);
+ Triangle(math::Vector3f const &v0, math::Vector3f const &v1, math::Vector3f const &v2,
+ math::Vector3f const &n, 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;}
+
/// indidcates if this triangle was generated from a detail brush
inline bool detail() const { return triangle_detail; }
/// triangle vertex 0
+ inline math::Vector3f & v0() { return triangle_v0; }
+
+ /// triangle vertex 1
+ inline math::Vector3f & v1() { return triangle_v1; }
+
+ /// triangle vertex 2
+ 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;
-private:
math::Vector3f triangle_normal;
math::Color triangle_color;
bool triangle_detail;