From e8c69e69374b6650e37594ebf104602fb06b548b Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Thu, 31 Mar 2011 18:38:23 +0300 Subject: Inclass Documentation cleanup of public API --- src/com/jogamp/graph/geom/Outline.java | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/com/jogamp/graph/geom') diff --git a/src/com/jogamp/graph/geom/Outline.java b/src/com/jogamp/graph/geom/Outline.java index 24f44b5fc..a805adf6c 100644 --- a/src/com/jogamp/graph/geom/Outline.java +++ b/src/com/jogamp/graph/geom/Outline.java @@ -57,7 +57,7 @@ public class Outline implements Comparable { } - /** Add a vertex to the outline. The vertex is added at the + /** Add a vertex to the outline. The {@link Vertex} is added at the * end of the outline loop/strip. * @param vertex Vertex to be added */ @@ -66,16 +66,47 @@ public class Outline implements Comparable { box.resize(vertex.getX(), vertex.getY(), vertex.getZ()); } + /** Add a {@link Vertex} by specifying its 2D attributes to the outline. + * The {@link Vertex} is added at the + * end of the outline loop/strip. + * @param factory a {@link Factory} to get the required Vertex impl + * @param x the x coordinate + * @param y the y coordinate + * @param onCurve flag if this vertex is on the final curve or defines a curved region + * of the shape around this vertex. + */ public final void addVertex(Vertex.Factory factory, float x, float y, boolean onCurve) { addVertex(factory, x, y, 0f, onCurve); } + /** Add a {@link Vertex} by specifying its 3D attributes to the outline. + * The {@link Vertex} is added at the + * end of the outline loop/strip. + * @param factory a {@link Factory} to get the required Vertex impl + * @param x the x coordinate + * @param y the y coordinate + * @param z the z coordinate + * @param onCurve flag if this vertex is on the final curve or defines a curved region + * of the shape around this vertex. + */ public final void addVertex(Vertex.Factory factory, float x, float y, float z, boolean onCurve) { Vertex v = factory.create(x, y, z); v.setOnCurve(onCurve); addVertex(v); } + /** Add a vertex to the outline by passing a float array and specifying the + * offset and length in which. The attributes of the vertex are located. + * The attributes should be continuous (stride = 0). + * Attributes which value are not set (when length less than 3) + * are set implicitly to zero. + * @param factory a {@link Factory} to get the required Vertex impl + * @param coordsBuffer the coordinate array where the vertex attributes are to be picked from + * @param offset the offset in the buffer to the x coordinate + * @param length the number of attributes to pick from the buffer (maximum 3) + * @param onCurve flag if this vertex is on the final curve or defines a curved region + * of the shape around this vertex. + */ public final void addVertex(Vertex.Factory factory, float[] coordsBuffer, int offset, int length, boolean onCurve) { Vertex v = factory.create(coordsBuffer, offset, length); v.setOnCurve(onCurve); -- cgit v1.2.3