|
From: Ethan A M. <merritt@u.washington.edu> - 2005-10-16 23:53:29
|
In gadgets.c we have the very nice clipping routines: clip_line() draw_clip_line() In graphics.c we have a separate collection of very specialized but also rather complicated routines: edge_intersect() two_edge_intersect() edge_intersect_steps() edge_intersect_fsteps() two_edge_intersect_steps() two_edge_intersect_fsteps() Is this a code duplication due to historical artifact? At first glance all of the 100-200 line *_edge_intersect_* routines appear to do essentially the same thing as a simple series of calls to clip_line(). Am I missing a more sophisticated function or extra benefit of the longer routines? Many code sections in graphics.c and graph3d.c test and sort line segments by the inrange/outrange property of their endpoints, and then call these single-purpose *_edge_intersect_* routines to perform clipping. I am wondering if these sections can be simplified dramatically by instead drawing all of the individual segments via draw_clip_line(). -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |