- 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 int
A segment of a surface is a cubic Bézier patch.static final int
A 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 int
A segment of a surface is a cubic-vertex triangle.static final int
A 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.int
currentSegment
(double[] coords) Get the current segment using double-precision values.int
currentSegment
(float[] coords) Get the current segment using single-precision values.Return the tag for the current segment.boolean
isDone()
Return true if iteration is complete.boolean
Determine if a segment is from an oriented surface.void
next()
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.- 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.- 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.- 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.- 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_TRIANGLE
orCUBIC_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_TRIANGLE
orPLANAR_TRIANGLE
orCUBIC_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.
-