From e8c69e69374b6650e37594ebf104602fb06b548b Mon Sep 17 00:00:00 2001
From: Rami Santina <rami.santina@gmail.com>
Date: Thu, 31 Mar 2011 18:38:23 +0300
Subject: Inclass Documentation cleanup of public API

---
 src/com/jogamp/graph/curve/OutlineShape.java       | 20 +++++++------
 src/com/jogamp/graph/curve/Region.java             |  6 ++--
 src/com/jogamp/graph/curve/RegionFactory.java      |  4 +--
 .../jogamp/graph/curve/opengl/RegionRenderer.java  | 13 +++++----
 .../jogamp/graph/curve/opengl/TextRenderer.java    | 16 +++++------
 .../jogamp/graph/curve/tess/CDTriangulator2D.java  |  4 +--
 src/com/jogamp/graph/geom/Outline.java             | 33 +++++++++++++++++++++-
 7 files changed, 65 insertions(+), 31 deletions(-)

(limited to 'src')

diff --git a/src/com/jogamp/graph/curve/OutlineShape.java b/src/com/jogamp/graph/curve/OutlineShape.java
index 0c3988db3..827717aa5 100755
--- a/src/com/jogamp/graph/curve/OutlineShape.java
+++ b/src/com/jogamp/graph/curve/OutlineShape.java
@@ -95,7 +95,7 @@ public class OutlineShape {
 	public static final int QUADRATIC_NURBS = 10;
 	private final Vertex.Factory<? extends Vertex> vertexFactory;
 
-	/** The list of outlines that are part of this 
+	/** The list of {@link Outline}s that are part of this 
 	 *  outline shape.
 	 */
 	private ArrayList<Outline> outlines = new ArrayList<Outline>(3);
@@ -112,7 +112,7 @@ public class OutlineShape {
 	 */
 	public final Vertex.Factory<? extends Vertex> vertexFactory() { return vertexFactory; }
 
-	/** Add a new empty outline 
+	/** Add a new empty {@link Outline} 
 	 * to the shape, this new outline will
 	 * be placed at the end of the outline list.
 	 * 
@@ -123,7 +123,7 @@ public class OutlineShape {
 		outlines.add(new Outline());
 	}
 
-	/** Adds an outline to the OutlineShape object
+	/** Adds an {@link Outline} to the OutlineShape object
 	 * if last outline of the shape is empty, it will replace
 	 * that last Outline with the new one. If outline is empty,
 	 * it will do nothing.
@@ -147,7 +147,7 @@ public class OutlineShape {
 		getLastOutline().addVertex(v);
 	}
 
-	/** Add a 2D vertex to the last outline by defining the coordniate attribute
+	/** Add a 2D {@link Vertex} to the last outline by defining the coordniate attribute
 	 * of the vertex. The 2D vertex will be represented as Z=0.
 	 * 
 	 * @param x the x coordinate
@@ -159,7 +159,7 @@ public class OutlineShape {
 		getLastOutline().addVertex(vertexFactory, x, y, onCurve);
 	}
 
-	/** Add a 3D vertex to the last outline by defining the coordniate attribute
+	/** Add a 3D {@link Vertex} to the last outline by defining the coordniate attribute
 	 * of the vertex.
 	 * @param x the x coordinate
 	 * @param y the y coordniate
@@ -171,9 +171,11 @@ public class OutlineShape {
 		getLastOutline().addVertex(vertexFactory, x, y, z, onCurve);
 	}
 
-	/** Add a vertex to the last 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.
+	/** Add a vertex to the last 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 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)
@@ -270,7 +272,7 @@ public class OutlineShape {
 		return triangulate(0.5f);
 	}
 
-	/**Triangulate the outline shape generating a list of triangles
+	/**Triangulate the {@link OutlineShape} generating a list of triangles
 	 * @param sharpness defines the curvature strength around the off-curve vertices.
 	 * defaults to 0.5f
 	 * @return an arraylist of triangles representing the filled region
diff --git a/src/com/jogamp/graph/curve/Region.java b/src/com/jogamp/graph/curve/Region.java
index 143b6f502..5c4e8dad1 100755
--- a/src/com/jogamp/graph/curve/Region.java
+++ b/src/com/jogamp/graph/curve/Region.java
@@ -64,7 +64,7 @@ public interface Region {
 	/** Renders the associated OGL objects specifying
 	 * current width/hight of window for multi pass rendering
 	 * of the region.
-	 * @param matrix current pmv matrix.
+	 * @param matrix current {@link PMVMatrix}.
 	 * @param vp_width current screen width
 	 * @param vp_height current screen height
 	 * @param width texture width for mp rendering
@@ -73,7 +73,7 @@ public interface Region {
 	 */
 	public void render(PMVMatrix matrix, int vp_width, int vp_height, int width);
 	
-	/** Adds a list of {@code Triangle} objects to the Region
+	/** Adds a list of {@link Triangle} objects to the Region
 	 * These triangles are to be binded to OGL objects 
 	 * on the next call to {@code update}
 	 * @param tris an arraylist of triangle objects
@@ -91,7 +91,7 @@ public interface Region {
 	 */
 	public int getNumVertices();
 	
-	/** Adds a list of {@code Vertex} objects to the Region
+	/** Adds a list of {@link Vertex} objects to the Region
 	 * These vertices are to be binded to OGL objects 
 	 * on the next call to {@code update}
 	 * @param verts an arraylist of vertex objects
diff --git a/src/com/jogamp/graph/curve/RegionFactory.java b/src/com/jogamp/graph/curve/RegionFactory.java
index fe77e1be5..d3b978b8a 100755
--- a/src/com/jogamp/graph/curve/RegionFactory.java
+++ b/src/com/jogamp/graph/curve/RegionFactory.java
@@ -43,8 +43,8 @@ import jogamp.graph.curve.opengl.VBORegion2PES2;
 public class RegionFactory {
 	
 	/**Create a Region based on the GLContext attached
-	 * @param context the current opengl context
-	 * @param st the shader state object
+	 * @param context the current {@link GLContext}
+	 * @param st the {@link ShaderState} object
 	 * @param type can be one of Region.SINGLE_PASS or Region.TWO_PASS
 	 * @return region 
 	 */
diff --git a/src/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/com/jogamp/graph/curve/opengl/RegionRenderer.java
index dfeff1b55..746eba636 100644
--- a/src/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -14,7 +14,7 @@ import com.jogamp.graph.geom.Vertex;
 
 public abstract class RegionRenderer extends Renderer {
     
-    /** Create a Hardware accelerated Region Renderer
+    /** Create a Hardware accelerated Curve Region Renderer
      */
     public static RegionRenderer create(Vertex.Factory<? extends Vertex> factory, int type) {
         return new jogamp.graph.curve.opengl.RegionRendererImpl01(factory, type);
@@ -24,7 +24,7 @@ public abstract class RegionRenderer extends Renderer {
         super(factory, type);
     }
     
-    /** Render an array of Outline shapes combined in one region
+    /** Render an array of {@link OutlineShape}s combined in one region
      *  at the position provided the triangles of the 
      *  shapes will be generated, if not yet generated
      * @param outlineShapes array of OutlineShapes to Render.
@@ -34,7 +34,7 @@ public abstract class RegionRenderer extends Renderer {
      */
     public abstract void renderOutlineShapes(GL2ES2 gl, OutlineShape[] outlineShapes, float[] position, int texSize);
 
-    /** Render outline in 3D space at the position provided
+    /** Render an {@link OutlineShape} in 3D space at the position provided
      *  the triangles of the shapes will be generated, if not yet generated
      * @param outlineShape the OutlineShape to Render.
      * @param position the initial translation of the outlineShape. 
@@ -54,9 +54,9 @@ public abstract class RegionRenderer extends Renderer {
         regions.clear();
     }       
 
-    /**
+    /** Create an ogl {@link Region} defining this {@link OutlineShape}
      * @param sharpness parameter for Region generation
-     * @return the resulting Region inclusive the generated region
+     * @return the resulting Region.
      */
     protected Region createRegion(GL2ES2 gl, OutlineShape outlineShape, float sharpness) {
         Region region = RegionFactory.create(gl.getContext(), st, regionType);
@@ -72,7 +72,8 @@ public abstract class RegionRenderer extends Renderer {
         return region;
     }
     
-    /**
+    /** Create an ogl {@link Region} defining the list of {@link OutlineShape}.
+     * Combining the Shapes into single buffers.
      * @param sharpness parameter for Region generation
      * @return the resulting Region inclusive the generated region
      */
diff --git a/src/com/jogamp/graph/curve/opengl/TextRenderer.java b/src/com/jogamp/graph/curve/opengl/TextRenderer.java
index 25e8b950f..83f2c93ca 100644
--- a/src/com/jogamp/graph/curve/opengl/TextRenderer.java
+++ b/src/com/jogamp/graph/curve/opengl/TextRenderer.java
@@ -15,6 +15,8 @@ import com.jogamp.graph.geom.Vertex;
 
 public abstract class TextRenderer extends Renderer {
     
+    protected HashMap<String, GlyphString> strings = new HashMap<String, GlyphString>();
+    
     /** 
      * Create a Hardware accelerated Text Renderer.
      * @param factory optional Point.Factory for Vertex construction. Default is Vertex.Factory.
@@ -30,7 +32,7 @@ public abstract class TextRenderer extends Renderer {
     /** Render the String in 3D space wrt to the font provided at the position provided
      * the outlines will be generated, if not yet generated
      * @param gl the current GL state
-     * @param font font to be used
+     * @param font {@link Font} to be used
      * @param str text to be rendered 
      * @param position the lower left corner of the string 
      * @param fontSize font size
@@ -40,13 +42,11 @@ public abstract class TextRenderer extends Renderer {
     public abstract void renderString3D(GL2ES2 gl, Font font,
                                         String str, float[] position, int fontSize, int texSize);
 
-    protected HashMap<String, GlyphString> strings = new HashMap<String, GlyphString>();
-
-    /**
-     * 
-     * @param font
-     * @param size
-     * @param str
+    /**Create the resulting {@link GlyphString} that represents
+     * the String wrt to the font.
+     * @param font {@link Font} to be used
+     * @param size font size
+     * @param str {@link String} to be created
      * @param sharpness parameter for Region generation of the resulting GlyphString
      * @return the resulting GlyphString inclusive the generated region
      */
diff --git a/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java
index cc2478409..a2e4ca50f 100644
--- a/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java
+++ b/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java
@@ -82,7 +82,7 @@ public class CDTriangulator2D {
 	}
 	
 	/** Add a curve to the list of profiles provided
-	 * @param polyline a bounding Outline
+	 * @param polyline a bounding {@link Outline}
 	 */
 	public void addCurve(Outline polyline){
 		Loop loop = null;
@@ -107,7 +107,7 @@ public class CDTriangulator2D {
 	}
 	
 	/** Generate the triangulation of the provided 
-	 *  List of Outlines
+	 *  List of {@link Outline}s
 	 */
 	public ArrayList<Triangle> generateTriangulation(){	
 		for(int i=0;i<loops.size();i++) {
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<Outline> {
 		
 	}
 	
-	/** 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<Outline> {
 		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<? extends Vertex> 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<? extends Vertex> 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<? extends Vertex> factory, float[] coordsBuffer, int offset, int length, boolean onCurve) {
 		Vertex v = factory.create(coordsBuffer, offset, length);
 		v.setOnCurve(onCurve);
-- 
cgit v1.2.3