net.java.joglutils.msg.misc
Interface TriangleCallback


public interface TriangleCallback

Supports iteration over the triangles inside shapes.


Method Summary
 void triangleCB(int triangleIndex, PrimitiveVertex v0, int i0, PrimitiveVertex v1, int i1, PrimitiveVertex v2, int i2)
          Called for each triangle generated during enumeration of the triangles in a particular shape.
 

Method Detail

triangleCB

void triangleCB(int triangleIndex,
                PrimitiveVertex v0,
                int i0,
                PrimitiveVertex v1,
                int i1,
                PrimitiveVertex v2,
                int i2)
Called for each triangle generated during enumeration of the triangles in a particular shape. Certain elements of the PrimitiveVertex objects may be null if not set, such as normals or texture coordinates. Note that the PrimitiveVertex objects may be reused between calls, so users should copy them if necessary.

Parameters:
triangleIndex - the index within the set of triangles [0..num tris - 1]
v0 - primitive vertex 0
i0 - index of primitive vertex 0 in the current coordinates
v1 - primitive vertex 1
i1 - index of primitive vertex 1 in the current coordinates
v2 - primitive vertex 2
i2 - index of primitive vertex 2 in the current coordinates