diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
4 files changed, 22 insertions, 22 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index 2da0f6850..cda46d8f6 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -502,11 +502,11 @@ public final class OutlineShape implements Comparable<OutlineShape> { * Closes the last outline in the shape. * <p> * Checks whether the last vertex equals to the first of the last outline. - * If not equal, it either appends a clone of the first vertex - * or prepends a clone of the last vertex, depending on <code>closeTail</code>. + * If not equal, it either appends a copy of the first vertex + * or prepends a copy of the last vertex, depending on <code>closeTail</code>. * </p> - * @param closeTail if true, a clone of the first vertex will be appended, - * otherwise a clone of the last vertex will be prepended. + * @param closeTail if true, a copy of the first vertex will be appended, + * otherwise a copy of the last vertex will be prepended. */ public final void closeLastOutline(final boolean closeTail) { if( getLastOutline().setClosed( closeTail ) ) { diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java index 272f92f37..b593c20be 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java @@ -80,7 +80,7 @@ public class Outline implements Comparable<Outline> { winding = src.getWinding(); dirtyWinding = false; for(int i=0; i<count; i++) { - vertices.add( src.vertices.get(i).clone() ); + vertices.add( src.vertices.get(i).copy() ); } closed = src.closed; bbox = new AABBox(src.bbox); @@ -103,12 +103,12 @@ public class Outline implements Comparable<Outline> { dirtyWinding = false; if( enforce != had_winding ) { for(int i=count-1; i>=0; --i) { - vertices.add( src.vertices.get(i).clone() ); + vertices.add( src.vertices.get(i).copy() ); } winding = enforce; } else { for(int i=0; i<count; ++i) { - vertices.add( src.vertices.get(i).clone() ); + vertices.add( src.vertices.get(i).copy() ); } } closed = src.closed; @@ -256,11 +256,11 @@ public class Outline implements Comparable<Outline> { * Ensure this outline is closed. * <p> * Checks whether the last vertex equals to the first. - * If not equal, it either appends a clone of the first vertex - * or prepends a clone of the last vertex, depending on <code>closeTail</code>. + * If not equal, it either appends a copy of the first vertex + * or prepends a copy of the last vertex, depending on <code>closeTail</code>. * </p> - * @param closeTail if true, a clone of the first vertex will be appended, - * otherwise a clone of the last vertex will be prepended. + * @param closeTail if true, a copy of the first vertex will be appended, + * otherwise a copy of the last vertex will be prepended. * @return true if closing performed, otherwise false for NOP */ public final boolean setClosed(final boolean closeTail) { @@ -270,9 +270,9 @@ public class Outline implements Comparable<Outline> { final Vertex last = getLastVertex(); if( !first.getCoord().isEqual( last.getCoord() ) ) { if( closeTail ) { - vertices.add(first.clone()); + vertices.add(first.copy()); } else { - vertices.add(0, last.clone()); + vertices.add(0, last.copy()); } return true; } diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java index e26d2aaf1..032213387 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java @@ -46,9 +46,9 @@ public class Triangle { public Triangle(final Triangle src) { id = src.id; - vertices[0] = src.vertices[0].clone(); - vertices[1] = src.vertices[1].clone(); - vertices[2] = src.vertices[2].clone(); + vertices[0] = src.vertices[0].copy(); + vertices[1] = src.vertices[1].copy(); + vertices[2] = src.vertices[2].copy(); System.arraycopy(src.boundaryEdges, 0, boundaryEdges, 0, 3); boundaryVertices = new boolean[3]; System.arraycopy(src.boundaryVertices, 0, boundaryVertices, 0, 3); @@ -62,7 +62,7 @@ public class Triangle { } /** - * Returns a transformed a clone of this instance using the given AffineTransform. + * Returns a transformed copy of this instance using the given AffineTransform. */ public Triangle transform(final AffineTransform t) { final Triangle tri = new Triangle(id, boundaryEdges, boundaryVertices); diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java index 8744474d9..67d468ab6 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java @@ -34,7 +34,7 @@ import com.jogamp.math.Vert3fImmutable; /** * A Vertex exposing Vec3f vertex- and texture-coordinates. */ -public final class Vertex implements Vert3fImmutable, Cloneable { +public final class Vertex implements Vert3fImmutable { private int id; private boolean onCurve; private final Vec3f coord = new Vec3f(); @@ -44,6 +44,7 @@ public final class Vertex implements Vert3fImmutable, Cloneable { this.id = Integer.MAX_VALUE; } + /** Copy ctor */ public Vertex(final Vertex src) { this.id = Integer.MAX_VALUE; coord.set(src.getCoord()); @@ -195,11 +196,10 @@ public final class Vertex implements Vert3fImmutable, Cloneable { } /** - * @return deep clone of this Vertex elements + * @return deep copy of this Vertex element via {@link Vertex#Vertex(Vertex)} */ - @Override - public Vertex clone(){ - return new Vertex(this); // OK to not call super.clone(), using own copy-ctor + public Vertex copy(){ + return new Vertex(this); } @Override |