- All Known Implementing Classes:
SubdivisionIterator
public interface SurfaceIterator
An iterator describing a surface embedded in a space that has
three dimensions.
The surface is described by a series of segments, with the
segments appearing in an arbitrary order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA segment of a surface is a cubic Bézier patch.static final intA segment of a surface is a cubic Bézier triangle For this type of segment, there are 10 control points for a total of 30 double- or single-precision values.static final intA segment of a surface is a cubic-vertex triangle.static final intA segment of a surface is a planar triangle For this type of segment, there are 3 control points for a total of 9 double- or single-precision values. -
Method Summary
Modifier and TypeMethodDescriptionReturn the color for the current segment.intcurrentSegment(double[] coords) Get the current segment using double-precision values.intcurrentSegment(float[] coords) Get the current segment using single-precision values.Return the tag for the current segment.booleanisDone()Return true if iteration is complete.booleanDetermine if a segment is from an oriented surface.voidnext()Move to the next segment.
-
Field Details
-
CUBIC_PATCH
static final int CUBIC_PATCHA segment of a surface is a cubic Bézier patch. For this type of segment, there are 16 control points for a total of 48 double- or single-precision values.The order of the control points is specified in the documentation for
Surface3D.addCubicPatch(double[]).- See Also:
-
CUBIC_TRIANGLE
static final int CUBIC_TRIANGLEA segment of a surface is a cubic Bézier triangle For this type of segment, there are 10 control points for a total of 30 double- or single-precision values. The order of the control points is specified in the documentation forSurface3D.addCubicTriangle(double[]).- See Also:
-
PLANAR_TRIANGLE
static final int PLANAR_TRIANGLEA segment of a surface is a planar triangle For this type of segment, there are 3 control points for a total of 9 double- or single-precision values. The order of the control points is specified in the documentation forSurface3D.addPlanarTriangle(double[]).- See Also:
-
CUBIC_VERTEX
static final int CUBIC_VERTEXA segment of a surface is a cubic-vertex triangle. For this type of segments, there are 5 control points for a total of 15 double- or single-precision values. The first 4 control points define a Bézier curve and the last control points defines a vertex. The surface segment consists of all points on the Bézier curve connected to the vertex by straight-line segments. The order of the control points is specified in the documentation forSurface3D.addCubicVertex(double[]).- See Also:
-
-
Method Details
-
currentSegment
int currentSegment(double[] coords) Get the current segment using double-precision values. The length of the argument array should be at least 48. The number of elements used depends on the mode. The format for the argument array is given by- Parameters:
coords- an array to store the values- Returns:
- one of the constants
CUBIC_PATCH,CUBIC_TRIANGLE,PLANAR_TRIANGLEorCUBIC_VERTEX
-
currentSegment
int currentSegment(float[] coords) Get the current segment using single-precision values. The length of the argument array should be at least 48. The format for the argument array is given by- Parameters:
coords- an array to store the values- Returns:
- one of the constants
CUBIC_PATCH,CUBIC_TRIANGLEorPLANAR_TRIANGLEorCUBIC_VERTEX
-
isDone
boolean isDone()Return true if iteration is complete.- Returns:
- true if iteration is complete; false otherwise
-
currentTag
Object currentTag()Return the tag for the current segment. A tag is typically a stack trace indicating where a patch was created.- Returns:
- the segment's tag; null if there is none
-
currentColor
Color currentColor()Return the color for the current segment.- Returns:
- the segment's color; null if none was defined
-
isOriented
boolean isOriented()Determine if a segment is from an oriented surface.- Returns:
- true if a segment is from an oriented surface; false otherwise
-
next
void next()Move to the next segment.
-