diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-02 02:41:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-02 02:41:55 +0400 |
commit | dee33e80970ff0b83a06b2dd5d23b8e25f7317df (patch) | |
tree | 437f98d8bc3e1d4a37cf33b2bef6090a06526fc0 /source/gameengine/Rasterizer | |
parent | 3bbf11761a78e45be465f7ebb3a7e4dfc1f9b13b (diff) |
fix [#34609] mesh.getVertex doesn't work as spected with poly.getMaterialIndex() and poly vertex indexes
revert r22906 (own old commit, was incorrectly trying to make vertex indices absolute)
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_Polygon.cpp | 15 | ||||
-rw-r--r-- | source/gameengine/Rasterizer/RAS_Polygon.h | 1 |
2 files changed, 0 insertions, 16 deletions
diff --git a/source/gameengine/Rasterizer/RAS_Polygon.cpp b/source/gameengine/Rasterizer/RAS_Polygon.cpp index 74544a80efa..72e09c9667d 100644 --- a/source/gameengine/Rasterizer/RAS_Polygon.cpp +++ b/source/gameengine/Rasterizer/RAS_Polygon.cpp @@ -34,7 +34,6 @@ #endif #include "RAS_Polygon.h" -#include "RAS_MeshObject.h" /* only for GetVertexOffsetAbs */ RAS_Polygon::RAS_Polygon(RAS_MaterialBucket* bucket, RAS_DisplayArray *darray, int numvert) { @@ -67,20 +66,6 @@ int RAS_Polygon::GetVertexOffset(int i) return m_offset[i]; } -int RAS_Polygon::GetVertexOffsetAbs(RAS_MeshObject *mesh, int i) -{ - /* hack that only works because there can only ever be 2 different - * GetDisplayArray's per mesh. if this uses a different display array to the first - * then its indices are offset. - * if support for edges is added back this would need to be changed. */ - RAS_DisplayArray* darray= mesh->GetPolygon(0)->GetDisplayArray(); - - if (m_darray != darray) - return m_offset[i] + darray->m_vertex.size(); - - return m_offset[i]; -} - /* int RAS_Polygon::GetEdgeCode() { diff --git a/source/gameengine/Rasterizer/RAS_Polygon.h b/source/gameengine/Rasterizer/RAS_Polygon.h index bc70b43286c..088bdbd6844 100644 --- a/source/gameengine/Rasterizer/RAS_Polygon.h +++ b/source/gameengine/Rasterizer/RAS_Polygon.h @@ -75,7 +75,6 @@ public: void SetVertexOffset(int i, unsigned short offset); int GetVertexOffset(int i); - int GetVertexOffsetAbs(RAS_MeshObject *mesh, int i); /* accounts for quad and tri arrays, slower, for python */ // each bit is for a visible edge, starting with bit 1 for the first edge, bit 2 for second etc. // - Not used yet! |