Squeak Class Documentation category index | class index  
 
B3DVertexClipper
  category: Balloon3D-Engine
  superclass: B3DEnginePart
  subclasses: B3DPrimitiveClipper

I provide clipping capabilities for rasterizers needing explicit clipping.

instance methods
  clip flags
  clipFlagsX:y:z:w:
determineClipFlags:count:

  clipping polygons
  clipPolygon:count:with:mask:
clipPolygonBackFrom:to:count:
clipPolygonBottomFrom:to:count:
clipPolygonFrontFrom:to:count:
clipPolygonLeftFrom:to:count:
clipPolygonRightFrom:to:count:
clipPolygonTopFrom:to:count:

  clipping utilitites
  backClipValueFrom:to:
bottomClipValueFrom:to:
frontClipValueFrom:to:
interpolateFrom:to:at:
leftClipValueFrom:to:
rightClipValueFrom:to:
topClipValueFrom:to:

  private
  primNextClippedQuadAfter:vertices:count:indexes:count:
primNextClippedTriangleAfter:vertices:count:indexes:count:

  processing
  postProcessVertexBuffer:
preProcessVertexBuffer:
processIndexedLines:
processIndexedQuads:
processIndexedTriangles:
processLineLoop:
processLines:
processPoints:
processPolygon:
processVertexBuffer:

class methods
  class initialization
  initialize

  testing
  isAvailable

instance methods
  clip flags top  
 

clipFlagsX:y:z:w:

Determine the clip flags for the given vector.
The clip flags are a combination of inside and outside flags that can be used to easily reject an entire buffer if it is completely inside or outside and can also be used to detect the most commen cases in clipping (e.g., intersection with one boundary only).


 

determineClipFlags:count:

Determine the clip flags for all the vertices in the vertex array


  clipping polygons top  
 

clipPolygon:count:with:mask:

Clip the polygon defined by vtxCount vertices in vtxArray. tempVtxArray is a temporary storage area used for copying the vertices back and forth during clipping operation. outMask is the full clip mask of the vertex buffer, allowing some optimizations of the clipping code.
NOTE: It is significant here that the contents of vtxArray and tempVtxArray are equal.


 

clipPolygonBackFrom:to:count:


 

clipPolygonBottomFrom:to:count:


 

clipPolygonFrontFrom:to:count:


 

clipPolygonLeftFrom:to:count:


 

clipPolygonRightFrom:to:count:


 

clipPolygonTopFrom:to:count:


  clipping utilitites top  
 

backClipValueFrom:to:


 

bottomClipValueFrom:to:


 

frontClipValueFrom:to:


 

interpolateFrom:to:at:

Interpolate the primitive vertices last/next at the parameter t


 

leftClipValueFrom:to:


 

rightClipValueFrom:to:


 

topClipValueFrom:to:


  private top  
 

primNextClippedQuadAfter:vertices:count:indexes:count:

Find the next partially clipped quad from the vertex buffer and return its index.
If there are no more partially clipped quads return zero.


 

primNextClippedTriangleAfter:vertices:count:indexes:count:

Find the next partially clipped triangle from the vertex buffer and return its index.
If there are no more partially clipped triangles return zero.


  processing top  
 

postProcessVertexBuffer:

Clip individual items depending on the primitive type


 

preProcessVertexBuffer:

Clip the elements in the vertex buffer. Return true if all vertices are inside.
Return false if all vertices are outside. If partial clipping occurs, return nil.


 

processIndexedLines:

Process an indexed line set


 

processIndexedQuads:

Clip an indexed quad set


 

processIndexedTriangles:

Clip an indexed triangle set


 

processLineLoop:

Process a closed line defined by the vertex buffer


 

processLines:

Process a series of lines defined by each two points the vertex buffer


 

processPoints:

Process a series of points defined by the vertex buffer


 

processPolygon:

Process a polygon from the vertex buffer that requires partial clipping


 

processVertexBuffer:

Clip the elements in the vertex buffer. Return true if all vertices are inside.
Return false if all vertices are outside. If partial clipping occurs, return nil.


class methods
  class initialization top  
 

initialize

B3DClipper initialize


  testing top  
 

isAvailable

Return true if this part of the engine is available