|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-12-12 19:28:31
|
On 12.12.2010 20:10, Ethan Merritt wrote: > Is it possible that instead of modifying the pm3d code, one could modify > the hidden-surface removal code in hidden3d? The hidden3d code is > already finding all the relevant lines of intersection and occlusion. Actually, no. hidden3d deals with hidden _line_ removal, only. It has no code whatsoever for either sorting or splitting triangles. > At the end of the hidden3d calculation there is a collection of edges, > each of which is either all or part of an edge from the original set > of polygons or an intersection of two polygons. At that point the code > walks through the list and draws all the edges. Again, not really. hidden3d draws individual surviving segments immediately when they're discovered (in_front() calls draw_edge() itself). There is no complete list of visible edge fragments in memory at any time. > Does it track enough information to also call term->filled_polygon() > for each facet? It doesn't even try to track facets. It tracks edge fragments, not polygon fragments. > If not, could the data structures be expanded to hold that tracking > information? "Expanding" wouldn't really do describing the job justice. It'd be more of a complete rewrite. |