diff options
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_TexVert.h')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_TexVert.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/gameengine/Rasterizer/RAS_TexVert.h b/source/gameengine/Rasterizer/RAS_TexVert.h index bf092b4b230..4ec4db19e53 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.h +++ b/source/gameengine/Rasterizer/RAS_TexVert.h @@ -37,11 +37,6 @@ static MT_Point3 g_pt3; static MT_Point2 g_pt2; -#define TV_CALCFACENORMAL 0x0001 -#define TV_2NDUV 0x0002 - -#define TV_MAX 3//match Def in BL_Material.h - class RAS_TexVert { @@ -59,6 +54,12 @@ class RAS_TexVert // 32 bytes total size, fits nice = 56 = not fit nice. // We'll go for 64 bytes total size - 24 bytes left. public: + enum { + FLAT = 1, + SECOND_UV = 2, + MAX_UNIT = 8 + }; + short getFlag() const; unsigned int getUnit() const; @@ -70,7 +71,7 @@ public: const MT_Vector4& tangent, const unsigned int rgba, const MT_Vector3& normal, - const short flag, + const bool flat, const unsigned int origindex); ~RAS_TexVert() {}; @@ -82,7 +83,7 @@ public: return m_uv2; }; - const float* getLocalXYZ() const { + const float* getXYZ() const { return m_localxyz; }; @@ -108,20 +109,19 @@ public: void SetRGBA(const unsigned int rgba); void SetNormal(const MT_Vector3& normal); + void SetTangent(const MT_Vector3& tangent); void SetFlag(const short flag); void SetUnit(const unsigned u); void SetRGBA(const MT_Vector4& rgba); const MT_Point3& xyz(); - // compare two vertices, and return TRUE if both are almost identical (they can be shared) - bool closeTo(const RAS_TexVert* other); + void Transform(const class MT_Matrix4x4& mat, + const class MT_Matrix4x4& nmat); - bool closeTo(const MT_Point3& otherxyz, - const MT_Point2& otheruv, - const unsigned int otherrgba, - short othernormal[3]) const; - void getOffsets(void*&xyz, void *&uv1, void *&rgba, void *&normal) const; + // compare two vertices, to test if they can be shared, used for + // splitting up based on uv's, colors, etc + bool closeTo(const RAS_TexVert* other); }; #endif //__RAS_TEXVERT |