aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/geom
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/com/jogamp/graph/geom
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom')
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/Outline.java18
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/SVertex.java22
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/Triangle.java4
3 files changed, 22 insertions, 22 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
index 15a45b056..ea2059165 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
@@ -87,7 +87,7 @@ public class Outline implements Comparable<Outline> {
* @param vertex Vertex to be added
* @throws NullPointerException if the {@link Vertex} element is null
*/
- public final void addVertex(Vertex vertex) throws NullPointerException {
+ public final void addVertex(final Vertex vertex) throws NullPointerException {
addVertex(vertices.size(), vertex);
}
@@ -98,7 +98,7 @@ public class Outline implements Comparable<Outline> {
* @throws NullPointerException if the {@link Vertex} element is null
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position > getVertexNumber())
*/
- public final void addVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+ public final void addVertex(final int position, final Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
if (null == vertex) {
throw new NullPointerException("vertex is null");
}
@@ -116,7 +116,7 @@ public class Outline implements Comparable<Outline> {
* @throws NullPointerException if the {@link Outline} element is null
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
*/
- public final void setVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+ public final void setVertex(final int position, final Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
if (null == vertex) {
throw new NullPointerException("vertex is null");
}
@@ -124,11 +124,11 @@ public class Outline implements Comparable<Outline> {
dirtyBBox = true;
}
- public final Vertex getVertex(int index){
+ public final Vertex getVertex(final int index){
return vertices.get(index);
}
- public int getVertexIndex(Vertex vertex){
+ public int getVertexIndex(final Vertex vertex){
return vertices.indexOf(vertex);
}
@@ -138,7 +138,7 @@ public class Outline implements Comparable<Outline> {
* @param position of the to be removed Vertex
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
*/
- public final Vertex removeVertex(int position) throws IndexOutOfBoundsException {
+ public final Vertex removeVertex(final int position) throws IndexOutOfBoundsException {
dirtyBBox = true;
return vertices.remove(position);
}
@@ -164,7 +164,7 @@ public class Outline implements Comparable<Outline> {
*
* @param vertices the new outline loop/strip
*/
- public final void setVertices(ArrayList<Vertex> vertices) {
+ public final void setVertices(final ArrayList<Vertex> vertices) {
this.vertices = vertices;
validateBoundingBox();
}
@@ -184,7 +184,7 @@ public class Outline implements Comparable<Outline> {
* otherwise a clone of the last vertex will be prepended.
* @return true if closing performed, otherwise false for NOP
*/
- public final boolean setClosed(boolean closeTail) {
+ public final boolean setClosed(final boolean closeTail) {
this.closed = true;
if( !isEmpty() ) {
final Vertex first = vertices.get(0);
@@ -253,7 +253,7 @@ public class Outline implements Comparable<Outline> {
* @return true if {@code obj} is an Outline, not null, equals bounds and equal vertices in the same order
*/
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if( obj == this) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
index 579f92455..8df8fbb31 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
@@ -65,7 +65,7 @@ public class SVertex implements Vertex {
}
@Override
- public SVertex create(float[] coordsBuffer, int offset, int length, boolean onCurve) {
+ public SVertex create(final float[] coordsBuffer, final int offset, final int length, final boolean onCurve) {
return new SVertex(coordsBuffer, offset, length, onCurve);
}
}
@@ -100,14 +100,14 @@ public class SVertex implements Vertex {
}
@Override
- public final void setCoord(float x, float y, float z) {
+ public final void setCoord(final float x, final float y, final float z) {
coord[0] = x;
coord[1] = y;
coord[2] = z;
}
@Override
- public final void setCoord(float[] coordsBuffer, int offset, int length) {
+ public final void setCoord(final float[] coordsBuffer, final int offset, final int length) {
System.arraycopy(coordsBuffer, offset, coord, 0, length);
}
@@ -122,17 +122,17 @@ public class SVertex implements Vertex {
}
@Override
- public final void setX(float x) {
+ public final void setX(final float x) {
this.coord[0] = x;
}
@Override
- public final void setY(float y) {
+ public final void setY(final float y) {
this.coord[1] = y;
}
@Override
- public final void setZ(float z) {
+ public final void setZ(final float z) {
this.coord[2] = z;
}
@@ -157,7 +157,7 @@ public class SVertex implements Vertex {
}
@Override
- public final void setOnCurve(boolean onCurve) {
+ public final void setOnCurve(final boolean onCurve) {
this.onCurve = onCurve;
}
@@ -167,12 +167,12 @@ public class SVertex implements Vertex {
}
@Override
- public final void setId(int id){
+ public final void setId(final int id){
this.id = id;
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if( obj == this) {
return true;
}
@@ -192,14 +192,14 @@ public class SVertex implements Vertex {
}
@Override
- public final void setTexCoord(float s, float t, float p) {
+ public final void setTexCoord(final float s, final float t, final float p) {
texCoord[0] = s;
texCoord[1] = t;
texCoord[2] = p;
}
@Override
- public final void setTexCoord(float[] texCoordsBuffer, int offset, int length) {
+ public final void setTexCoord(final float[] texCoordsBuffer, final int offset, final int length) {
System.arraycopy(texCoordsBuffer, offset, texCoord, 0, length);
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
index 33e53f3ed..fc345f2a7 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
@@ -93,7 +93,7 @@ public class Triangle {
return id;
}
- public void setId(int id) {
+ public void setId(final int id) {
this.id = id;
}
@@ -118,7 +118,7 @@ public class Triangle {
return boundaryVertices;
}
- public void setVerticesBoundary(boolean[] boundaryVertices) {
+ public void setVerticesBoundary(final boolean[] boundaryVertices) {
this.boundaryVertices = boundaryVertices;
}