Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

SurfaceMesh::extractSubset
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=123
Page 1 of 1

Author:  DefiniteIntegral [ Sun Jan 23, 2011 3:31 pm ]
Post subject:  SurfaceMesh::extractSubset

Hello

Just thought I might mention that SurfaceMesh.inl line 354 - 356 for function SurfaceMesh::extractSubset which currently looks like this:

PositionMaterialNormal& v0 = m_vecVertices[m_vecTriangleIndices[triCt]];
PositionMaterialNormal& v1 = m_vecVertices[m_vecTriangleIndices[triCt + 1]];
PositionMaterialNormal& v2 = m_vecVertices[m_vecTriangleIndices[triCt + 2]];

should be this:

VertexType& v0 = m_vecVertices[m_vecTriangleIndices[triCt]];
VertexType& v1 = m_vecVertices[m_vecTriangleIndices[triCt + 1]];
VertexType& v2 = m_vecVertices[m_vecTriangleIndices[triCt + 2]];

otherwise it is not possible to extractSubset on a SurfaceMesh<PositionMaterial> such as when extracting multiple materials from a cubic surface without normals. To do so results in compile error unable to convert PositionMaterial& to PositionMaterialNormal&

Author:  David Williams [ Sun Jan 23, 2011 5:45 pm ]
Post subject:  Re: SurfaceMesh::extractSubset

Thanks for the heads up, this has been fixed.

When you update, be aware that extractSubset() is now a free function, rather than being a member of SurfaceMesh. As a member it was causing problems with the SWIG bindings. I'm not using this function myself, so I've done the move without really testing it (except that it still compiles). So let me know if you have any further problems with it...

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/