From 556d92b63555a085b25e32b1cd55afce24edd07a Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Thu, 3 Jul 2014 16:21:36 +0200
Subject: 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
---
 .../jogamp/opengl/glu/tessellator/Render.java      | 48 +++++++++++-----------
 1 file changed, 24 insertions(+), 24 deletions(-)

(limited to 'src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java')

diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
index a2e973508..6325de8d2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
@@ -73,7 +73,7 @@ class Render {
         public FaceCount() {
         }
 
-        public FaceCount(long size, jogamp.opengl.glu.tessellator.GLUhalfEdge eStart, renderCallBack render) {
+        public FaceCount(final long size, final jogamp.opengl.glu.tessellator.GLUhalfEdge eStart, final renderCallBack render) {
             this.size = size;
             this.eStart = eStart;
             this.render = render;
@@ -97,7 +97,7 @@ class Render {
  *
  * The rendering output is provided as callbacks (see the api).
  */
-    public static void __gl_renderMesh(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUmesh mesh) {
+    public static void __gl_renderMesh(final GLUtessellatorImpl tess, final jogamp.opengl.glu.tessellator.GLUmesh mesh) {
         jogamp.opengl.glu.tessellator.GLUface f;
 
         /* Make a list of separate triangles so we can render them all at once */
@@ -124,7 +124,7 @@ class Render {
     }
 
 
-    static void RenderMaximumFaceGroup(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUface fOrig) {
+    static void RenderMaximumFaceGroup(final GLUtessellatorImpl tess, final jogamp.opengl.glu.tessellator.GLUface fOrig) {
         /* We want to find the largest triangle fan or strip of unmarked faces
          * which includes the given face fOrig.  There are 3 possible fans
          * passing through fOrig (one centered at each vertex), and 3 possible
@@ -132,7 +132,7 @@ class Render {
          * is to try all of these, and take the primitive which uses the most
          * triangles (a greedy approach).
          */
-        jogamp.opengl.glu.tessellator.GLUhalfEdge e = fOrig.anEdge;
+        final jogamp.opengl.glu.tessellator.GLUhalfEdge e = fOrig.anEdge;
         FaceCount max = new FaceCount();
         FaceCount newFace = new FaceCount();
 
@@ -178,11 +178,11 @@ class Render {
  * more complicated, and we need a general tracking method like the
  * one here.
  */
-    private static boolean Marked(jogamp.opengl.glu.tessellator.GLUface f) {
+    private static boolean Marked(final jogamp.opengl.glu.tessellator.GLUface f) {
         return !f.inside || f.marked;
     }
 
-    private static GLUface AddToTrail(jogamp.opengl.glu.tessellator.GLUface f, jogamp.opengl.glu.tessellator.GLUface t) {
+    private static GLUface AddToTrail(final jogamp.opengl.glu.tessellator.GLUface f, final jogamp.opengl.glu.tessellator.GLUface t) {
         f.trail = t;
         f.marked = true;
         return f;
@@ -199,12 +199,12 @@ class Render {
         }
     }
 
-    static FaceCount MaximumFan(jogamp.opengl.glu.tessellator.GLUhalfEdge eOrig) {
+    static FaceCount MaximumFan(final jogamp.opengl.glu.tessellator.GLUhalfEdge eOrig) {
         /* eOrig.Lface is the face we want to render.  We want to find the size
          * of a maximal fan around eOrig.Org.  To do this we just walk around
          * the origin vertex as far as possible in both directions.
          */
-        FaceCount newFace = new FaceCount(0, null, renderFan);
+        final FaceCount newFace = new FaceCount(0, null, renderFan);
         jogamp.opengl.glu.tessellator.GLUface trail = null;
         jogamp.opengl.glu.tessellator.GLUhalfEdge e;
 
@@ -223,11 +223,11 @@ class Render {
     }
 
 
-    private static boolean IsEven(long n) {
+    private static boolean IsEven(final long n) {
         return (n & 0x1L) == 0;
     }
 
-    static FaceCount MaximumStrip(jogamp.opengl.glu.tessellator.GLUhalfEdge eOrig) {
+    static FaceCount MaximumStrip(final jogamp.opengl.glu.tessellator.GLUhalfEdge eOrig) {
         /* Here we are looking for a maximal strip that contains the vertices
          * eOrig.Org, eOrig.Dst, eOrig.Lnext.Dst (in that order or the
          * reverse, such that all triangles are oriented CCW).
@@ -238,7 +238,7 @@ class Render {
          * We walk the strip starting on a side with an even number of triangles;
          * if both side have an odd number, we are forced to shorten one side.
          */
-        FaceCount newFace = new FaceCount(0, null, renderStrip);
+        final FaceCount newFace = new FaceCount(0, null, renderStrip);
         long headSize = 0, tailSize = 0;
         jogamp.opengl.glu.tessellator.GLUface trail = null;
         jogamp.opengl.glu.tessellator.GLUhalfEdge e, eTail, eHead;
@@ -280,7 +280,7 @@ class Render {
 
     private static class RenderTriangle implements renderCallBack {
         @Override
-        public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
+        public void render(final GLUtessellatorImpl tess, final jogamp.opengl.glu.tessellator.GLUhalfEdge e, final long size) {
             /* Just add the triangle to a triangle list, so we can render all
              * the separate triangles at once.
              */
@@ -290,7 +290,7 @@ class Render {
     }
 
 
-    static void RenderLonelyTriangles(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUface f) {
+    static void RenderLonelyTriangles(final GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUface f) {
         /* Now we render all the separate triangles which could not be
          * grouped into a triangle fan or strip.
          */
@@ -325,7 +325,7 @@ class Render {
 
     private static class RenderFan implements renderCallBack {
         @Override
-        public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
+        public void render(final GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
             /* Render as many CCW triangles as possible in a fan starting from
              * edge "e".  The fan *should* contain exactly "size" triangles
              * (otherwise we've goofed up somewhere).
@@ -348,7 +348,7 @@ class Render {
 
     private static class RenderStrip implements renderCallBack {
         @Override
-        public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
+        public void render(final GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) {
             /* Render as many CCW triangles as possible in a strip starting from
              * edge "e".  The strip *should* contain exactly "size" triangles
              * (otherwise we've goofed up somewhere).
@@ -381,7 +381,7 @@ class Render {
  * contour for each face marked "inside".  The rendering output is
  * provided as callbacks (see the api).
  */
-    public static void __gl_renderBoundary(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUmesh mesh) {
+    public static void __gl_renderBoundary(final GLUtessellatorImpl tess, final jogamp.opengl.glu.tessellator.GLUmesh mesh) {
         jogamp.opengl.glu.tessellator.GLUface f;
         jogamp.opengl.glu.tessellator.GLUhalfEdge e;
 
@@ -403,7 +403,7 @@ class Render {
 
     private static final int SIGN_INCONSISTENT = 2;
 
-    static int ComputeNormal(GLUtessellatorImpl tess, double[] norm, boolean check)
+    static int ComputeNormal(final GLUtessellatorImpl tess, final double[] norm, final boolean check)
 /*
  * If check==false, we compute the polygon normal and place it in norm[].
  * If check==true, we check that each triangle in the fan from v0 has a
@@ -412,13 +412,13 @@ class Render {
  * are degenerate return 0; otherwise (no consistent orientation) return
  * SIGN_INCONSISTENT.
  */ {
-        jogamp.opengl.glu.tessellator.CachedVertex[] v = tess.cache;
+        final jogamp.opengl.glu.tessellator.CachedVertex[] v = tess.cache;
 //            CachedVertex vn = v0 + tess.cacheCount;
-        int vn = tess.cacheCount;
+        final int vn = tess.cacheCount;
 //            CachedVertex vc;
         int vc;
         double dot, xc, yc, zc, xp, yp, zp;
-        double[] n = new double[3];
+        final double[] n = new double[3];
         int sign = 0;
 
         /* Find the polygon normal.  It is important to get a reasonable
@@ -490,13 +490,13 @@ class Render {
  * Returns true if the polygon was successfully rendered.  The rendering
  * output is provided as callbacks (see the api).
  */
-    public static boolean __gl_renderCache(GLUtessellatorImpl tess) {
-        jogamp.opengl.glu.tessellator.CachedVertex[] v = tess.cache;
+    public static boolean __gl_renderCache(final GLUtessellatorImpl tess) {
+        final jogamp.opengl.glu.tessellator.CachedVertex[] v = tess.cache;
 //            CachedVertex vn = v0 + tess.cacheCount;
-        int vn = tess.cacheCount;
+        final int vn = tess.cacheCount;
 //            CachedVertex vc;
         int vc;
-        double[] norm = new double[3];
+        final double[] norm = new double[3];
         int sign;
 
         if (tess.cacheCount < 3) {
-- 
cgit v1.2.3