diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-16 16:55:37 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-16 16:55:37 +0400 |
commit | 52a835a179d59f91da8cd2e3d5c087d1f9aec4e4 (patch) | |
tree | d3c8c2f3f3188b444992b98ca1e20268127a9308 /source/gameengine/Rasterizer/RAS_TexVert.cpp | |
parent | 512c269a16f23fcea4766359bd71658104727200 (diff) |
Inline accessor methods used by armature deformation.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_TexVert.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_TexVert.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index c5b193cc941..add1a652d12 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -60,6 +60,8 @@ const MT_Point3& RAS_TexVert::xyz() return g_pt3; } +#ifndef RAS_TexVert_INLINE + void RAS_TexVert::SetXYZ(const MT_Point3& xyz) { xyz.getValue(m_localxyz); @@ -92,7 +94,6 @@ void RAS_TexVert::SetNormal(const MT_Vector3& normal) } -#ifndef RAS_TexVert_INLINE // leave multiline for debugging const float* RAS_TexVert::getUV1 () const { @@ -124,13 +125,13 @@ const unsigned int& RAS_TexVert::getRGBA() const // compare two vertices, and return TRUE if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { - return ((MT_Vector3(m_localxyz) - MT_Vector3(other->m_localxyz)).fuzzyZero() && - (MT_Vector2(m_uv1) - MT_Vector2(other->m_uv1)).fuzzyZero() && + return (m_flag == other->m_flag && + m_rgba == other->m_rgba && m_normal[0] == other->m_normal[0] && m_normal[1] == other->m_normal[1] && m_normal[2] == other->m_normal[2] && - m_flag == other->m_flag && - m_rgba == other->m_rgba) ; + (MT_Vector2(m_uv1) - MT_Vector2(other->m_uv1)).fuzzyZero() && + (MT_Vector3(m_localxyz) - MT_Vector3(other->m_localxyz)).fuzzyZero()) ; } @@ -141,12 +142,12 @@ bool RAS_TexVert::closeTo(const MT_Point3& otherxyz, const unsigned int otherrgba, short othernormal[3]) const { - return ((MT_Vector3(m_localxyz) - otherxyz).fuzzyZero() && - (MT_Vector2(m_uv1) - otheruv).fuzzyZero() && + return (m_rgba == otherrgba && m_normal[0] == othernormal[0] && m_normal[1] == othernormal[1] && m_normal[2] == othernormal[2] && - m_rgba == otherrgba) ; + (MT_Vector2(m_uv1) - otheruv).fuzzyZero() && + (MT_Vector3(m_localxyz) - otherxyz).fuzzyZero()) ; } |