From: <jo...@us...> - 2003-09-11 07:42:59
|
Update of /cvsroot/crystal/CS/include/csgeom In directory sc8-pr-cvs1:/tmp/cvs-serv19106/include/csgeom Modified Files: pmtools.h Log Message: - Jorrit cleaned up some sources in the stencil renderloop. - Jorrit did the following optimizations with regards to iPolygonMesh::CloseMesh() and the stencil renderloop: - CloseMesh() now returns a table of indices so it doesn't do an alloc for every single polygon. - The copy of the polygon mesh maintained by the stencil renderloop also avoids the per-polygon alloc now. - CloseMesh() now uses a more optimal way to close the mesh if it knows the base mesh prefers triangles. Index: pmtools.h =================================================================== RCS file: /cvsroot/crystal/CS/include/csgeom/pmtools.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pmtools.h 8 Sep 2003 12:41:51 -0000 1.7 +++ pmtools.h 11 Sep 2003 07:42:25 -0000 1.8 @@ -125,12 +125,11 @@ /** * Close a polygon mesh. * The current implementation is rather naive; it just returns all faces, - * but flipped. - * \remark Don't forget to delete[] the 'vertices' fields of the polygons - * returned in \p newPolys when you're done. + * but flipped. The returned table is a table of indices that are used + * in the returned polygons. Don't forget to delete[] that table! */ static void CloseMesh (iPolygonMesh* polyMesh, - csArray<csMeshedPolygon>& newPolys); + csArray<csMeshedPolygon>& newPolys, int*& vertidx, int& vertidx_len); /** * Triangulate a mesh from the polygon mesh data in the iPolygonMesh. |