net.java.joglutils.msg.misc
Interface TriangleCallback
public interface TriangleCallback
Supports iteration over the triangles inside shapes.
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 0i0
- index of primitive vertex 0 in the current coordinatesv1
- primitive vertex 1i1
- index of primitive vertex 1 in the current coordinatesv2
- primitive vertex 2i2
- index of primitive vertex 2 in the current coordinates