diff options
author | Sven Gothel <[email protected]> | 2011-05-10 23:54:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-05-10 23:54:39 +0200 |
commit | f5ec2dd42244282c2a005269ae4674ab78af269a (patch) | |
tree | 09e97a3f63a48eba51225181110067824bbf95a0 /src/jogl/classes/com/jogamp/graph/math/VectorUtil.java | |
parent | 9ceff75afcbf6c446e75c1be6b4be1e62d543f3a (diff) |
Graph: getWinding(ArrayList<Vertex> vertices) test; minor renaming
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/math/VectorUtil.java')
-rwxr-xr-x | src/jogl/classes/com/jogamp/graph/math/VectorUtil.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java index aae7a8c5c..b91969745 100755 --- a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java +++ b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java @@ -310,7 +310,7 @@ public class VectorUtil { /** Computes the area of a list of vertices to check if ccw
* @param vertices
- * @return positve area if ccw else negative area value
+ * @return positive area if ccw else negative area value
*/
public static float area(ArrayList<Vertex> vertices) {
int n = vertices.size();
@@ -323,4 +323,7 @@ public class VectorUtil { }
return area;
}
+ public static Winding getWinding(ArrayList<Vertex> vertices) {
+ return area(vertices) >= 0 ? Winding.CCW : Winding.CW ;
+ }
}
|