aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2011-05-06 14:39:17 +0200
committerSven Gothel <sgothel@jausoft.com>2011-05-06 14:39:17 +0200
commitd75835796900cac602f7e5789601ffba0a27efe2 (patch)
tree4331f4fa053f2f2ea02eee4c1974d7ea71689be0 /src/jogl/classes/com/jogamp/graph/geom/Vertex.java
parent59aa8737528743b83cf56b804c9d713bc325c97c (diff)
Graph: More std. functionality (equals, clone) / Better in-place transformation (cubic -> quadratic)
Impl. more of John Pritchard <jdp@syntelos.org> proposal https://github.com/syntelos/jogl/commit/05a7ec92d30e1e688b1eb7cc317cad83a0e8fd60 +++ More std. functionality (equals, deep clone) of AABBox, Vertex, Outline and OutlineShape. Simplify Vertex: - Remove 2 component constructor - Add on-curve in Vertex.Factory / Constructor - Adding equals(Object) - Remove Comparable/compareTo, since we only can make an equals statement Outline/OutlineShape: Handle dirty flag for boundary (new set/remove operation) OutlineShape: Better in-place transformation (cubic -> quadratic)
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom/Vertex.java')
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/Vertex.java29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
index 859add943..3080f32cc 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
@@ -30,22 +30,21 @@ package com.jogamp.graph.geom;
/**
* A Vertex with custom memory layout using custom factory.
*/
-public interface Vertex extends Comparable<Vertex>, Cloneable {
+public interface Vertex extends Cloneable {
public static interface Factory <T extends Vertex> {
T create();
- T create(float x, float y);
+ T create(float x, float y, float z, boolean onCurve);
- T create(float x, float y, float z);
-
- T create(float[] coordsBuffer, int offset, int length);
+ T create(float[] coordsBuffer, int offset, int length, boolean onCurve);
}
- void setCoord(float x, float y);
-
void setCoord(float x, float y, float z);
+ /**
+ * @see System#arraycopy(Object, int, Object, int, int) for thrown IndexOutOfBoundsException
+ */
void setCoord(float[] coordsBuffer, int offset, int length);
float[] getCoord();
@@ -70,11 +69,23 @@ public interface Vertex extends Comparable<Vertex>, Cloneable {
void setId(int id);
- int compareTo(Vertex p);
-
float[] getTexCoord();
void setTexCoord(float s, float t);
+ /**
+ * @see System#arraycopy(Object, int, Object, int, int) for thrown IndexOutOfBoundsException
+ */
+ void setTexCoord(float[] texCoordsBuffer, int offset, int length);
+
+ /**
+ * @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.
+ */
+ boolean equals(Object obj);
+
+ /**
+ * @return deep clone of this Vertex
+ */
Vertex clone();
}