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>2009-08-10 22:32:36 +0000
committerStijn Buys <ingar@osirion.org>2009-08-10 22:32:36 +0000
commitbd142a328328cdf0cbfbb59e4e0aa99dd51184b8 (patch)
treec2ed4e832e60b379723ea3f530c5b192bec0da61 /src/model/triangle.h
parentbbd04914749b2e3918796fe331daf649b06163ea (diff)
initial texture support for ase models
Diffstat (limited to 'src/model/triangle.h')
-rw-r--r--src/model/triangle.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/model/triangle.h b/src/model/triangle.h
index fe1c720..a3fb643 100644
--- a/src/model/triangle.h
+++ b/src/model/triangle.h
@@ -8,6 +8,7 @@
#define __INCLUDED_MODEL_TRIANGLE_H__
#include "math/color.h"
+#include "math/vector2f.h"
#include "math/vector3f.h"
namespace model
@@ -78,6 +79,12 @@ public:
return triangle_n0;
}
+ /// triangle vertex 0 texture coordinates
+ inline math::Vector2f & t0()
+ {
+ return triangle_t0;
+ }
+
/// triangle vertex 1
inline math::Vector3f & v1()
{
@@ -89,6 +96,12 @@ public:
{
return triangle_n1;
}
+
+ /// triangle vertex 1 texture coordinates
+ inline math::Vector2f & t1()
+ {
+ return triangle_t1;
+ }
/// triangle vertex 2
inline math::Vector3f & v2()
@@ -96,22 +109,31 @@ public:
return triangle_v2;
}
- /// triangle vertex 0 normal
+ /// triangle vertex 2 normal
inline math::Vector3f & n2()
{
return triangle_n2;
}
+ /// triangle vertex 2 texture coordinates
+ inline math::Vector2f & t2()
+ {
+ return triangle_t2;
+ }
+
private:
math::Vector3f triangle_v0;
math::Vector3f triangle_n0;
+ math::Vector2f triangle_t0;
math::Vector3f triangle_v1;
math::Vector3f triangle_n1;
+ math::Vector2f triangle_t1;
math::Vector3f triangle_v2;
math::Vector3f triangle_n2;
+ math::Vector2f triangle_t2;
math::Vector3f triangle_normal;
bool triangle_detail;