diff options
author | Harvey Harrison <[email protected]> | 2013-10-17 22:51:47 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-10-17 23:01:22 -0700 |
commit | f1ae8ddb87c88a57dce4593f006881ef6a7f0932 (patch) | |
tree | 0c25dff44d3781dadecc8234a9bc70e18e50cbc2 /src/jogl/classes/com/jogamp/graph/geom | |
parent | 5e9c02bce7b241a0bf95c8abca9a91cd25e51ed3 (diff) |
jogl: add missing @Override annotations
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom')
4 files changed, 26 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java index dfa6a8635..77a318078 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java @@ -173,6 +173,7 @@ public class Outline implements Cloneable, Comparable<Outline> { * as criteria. * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public final int compareTo(Outline outline) { float size = getBounds().getSize(); float newSize = outline.getBounds().getSize(); @@ -204,6 +205,7 @@ public class Outline implements Cloneable, Comparable<Outline> { * @param obj the Object to compare this Outline with * @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) { if( obj == this) { return true; @@ -229,6 +231,7 @@ public class Outline implements Cloneable, Comparable<Outline> { /** * @return deep clone of this Outline */ + @Override public Outline clone() { Outline o; try { diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java index bd0900495..a01cd834f 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java @@ -73,6 +73,7 @@ public class Triangle { this.boundaryVertices = boundaryVertices; } + @Override public String toString() { return "Tri ID: " + id + "\n" + vertices[0] + "\n" + vertices[1] + "\n" + vertices[2]; } diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java index 40048235e..994253f71 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java @@ -76,6 +76,7 @@ public interface Vertex extends Vert3fImmutable, Cloneable { * @param obj the Object to compare this Vertex with * @return true if {@code obj} is a Vertex and not null, on-curve flag is equal and has same vertex- and tex-coords. */ + @Override boolean equals(Object obj); /** diff --git a/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java index 6b07688a7..b27604a44 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java @@ -45,14 +45,17 @@ public class SVertex implements Vertex { public static Factory factory() { return factory; } public static class Factory implements Vertex.Factory<SVertex> { + @Override public SVertex create() { return new SVertex(); } + @Override public SVertex create(float x, float y, float z, boolean onCurve) { return new SVertex(x, y, z, onCurve); } + @Override public SVertex create(float[] coordsBuffer, int offset, int length, boolean onCurve) { return new SVertex(coordsBuffer, offset, length, onCurve); } @@ -78,12 +81,14 @@ public class SVertex implements Vertex { setOnCurve(onCurve); } + @Override public final void setCoord(float x, float y, float z) { this.coord[0] = x; this.coord[1] = y; this.coord[2] = z; } + @Override public final void setCoord(float[] coordsBuffer, int offset, int length) { System.arraycopy(coordsBuffer, offset, coord, 0, length); } @@ -98,46 +103,57 @@ public class SVertex implements Vertex { return coord; } + @Override public final void setX(float x) { this.coord[0] = x; } + @Override public final void setY(float y) { this.coord[1] = y; } + @Override public final void setZ(float z) { this.coord[2] = z; } + @Override public final float getX() { return this.coord[0]; } + @Override public final float getY() { return this.coord[1]; } + @Override public final float getZ() { return this.coord[2]; } + @Override public final boolean isOnCurve() { return onCurve; } + @Override public final void setOnCurve(boolean onCurve) { this.onCurve = onCurve; } + @Override public final int getId(){ return id; } + @Override public final void setId(int id){ this.id = id; } + @Override public boolean equals(Object obj) { if( obj == this) { return true; @@ -152,15 +168,18 @@ public class SVertex implements Vertex { VectorUtil.checkEquality(getCoord(), v.getCoord()) ; } + @Override public final float[] getTexCoord() { return texCoord; } + @Override public final void setTexCoord(float s, float t) { this.texCoord[0] = s; this.texCoord[1] = t; } + @Override public final void setTexCoord(float[] texCoordsBuffer, int offset, int length) { System.arraycopy(texCoordsBuffer, offset, texCoord, 0, length); } @@ -168,10 +187,12 @@ public class SVertex implements Vertex { /** * @return deep clone of this Vertex, but keeping the id blank */ + @Override public SVertex clone(){ return new SVertex(this.coord, 0, 3, this.texCoord, 0, 2, this.onCurve); } + @Override public String toString() { return "[ID: " + id + ", onCurve: " + onCurve + ": p " + coord[0] + ", " + coord[1] + ", " + coord[2] + |