|
From: James W. <ja...@fr...> - 2008-09-16 10:24:14
|
Roger Holmes wrote: > I have had a problem with a corrupt 3DMF file which draws OK and seems > fine until I do some complicated manipulations on it where my code > gets everything which is not already a TriMesh into a TriMesh (or > Triangle) and calls Q3TriMesh_GetData on all the objects. Part of what > this gives me is an edge list which contains pairs of triangle > indices. The problem came when I got a triangle index of 86 and there > were only 11 triangles in the triangle list. This caused my program to > crash. > > I am now filtering the data I get back from Q3TriMesh_GetData and > every index which is invalid gets set to 0xFFFFFFFF which means the > edge has no triangle on that side. > > So others don't have to spend two days debugging, would it be worth > adding this extra processing to Q3TriMesh_GetData itself, or where we > read the trimeshes in from the 3DMF? What about doing the sanity check in e3geom_trimesh_new, so it would cover TriMeshes created by means other than reading 3DMF? -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |