摘要 |
A triangle primitive to be clipped against a viewing volume is clipped six times; once against each plane of the viewing volume. During each such clipping operation phantom vertices are discovered and the hardware vertex locations they occupy are made available for re-use. The discovery of phantom vertices is accomplished by three rules. Rule #1 is: If a previous vertex in the vertex list is outside the clip limits and is not the starting vertex, then that previous vertex's location in the vertex list can be re-used. Rule #2 is: If the current vertex in the vertex list is outside the clip limits and is the starting vertex, then the location in the vertex list containing the data for that starting vertex can be re-used to contain the intersection of that last edge and the clipping plane. Rule #3 is: If the current vertex in the vertex list is outside the clip limits and there has already been an intersection between the clipping plane and another edge, then the locations in the vertex list containing the data for vertices from that current vertex and beyond can be re-used to contain any new vertices. These rules are implemented by various state machines that also control the clipper.
|