Outcode Clipping of Lines
First, let's consider line segments.
if (outcode1 == '0000' and outcode2 == 0000) then
line segment is inside
else
if (outcode1 and outcode2 == 0000) then
line segment potentially crosses clip region
else
line is entirely outside of clip region
endif
endif
Notice that the test cannot conclusively state whether the segment crosses the clip region.
This might cause some segments that are located entirely outside of the clipping volume to
be subssequently processed.
Is there a way to modify this test so that it can eliminate these false positives?
|
|
|