Here is what I'll be doing...

I have a collection of line segments forming a path that winds through
the scene in all dimensions.  I want to clip this path to a cube
boundary. The user can "pan across" the path within the fixed cube, so
the clipping will have to be updated continuously. I can set the
visibility property to false for segments that fall outside the
boundaries, and true for segments that fall entirely within the
clipping bounds (see diagram - thick red lines).  But for segments
that cross the clipping boundary, I will have to set these segments to
invisible, then create a temporary group of lines that span from the
visible segments to the boundary intersection (see diagram - green
lines).  The idea is to avoid erasing and redrawing the entire path on
every update. Instead I can draw the entire path once, manage
visibility of each segment, and draw spanning paths at the boundary
intersection. Then on every update I have a manageable number of
created and discarded line segments.

Or, maybe I don't need to create new line segments at the boundary;
maybe I can just modify the start/end vertex property of the
overlapping line segment so that the vertex coincides with the
boundary plane.

Maybe I'm not going about this in the simplest or fastest way. I am
wide open to suggestions.

diagram: http://www.baslerdesign.com/matt/LineSegmentClipping.png

Reply via email to