summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/glu/nurbs
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/glu/nurbs
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
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
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/glu/nurbs')
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Arc.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java20
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Bin.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfArcs.java24
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfBreakpts.java16
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfFloats.java24
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfQuiltspecs.java18
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java28
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Curvelist.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Flist.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java74
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java34
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java16
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbscurve.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbssurface.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Property.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/PwlArc.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java36
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Renderhints.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java22
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java198
28 files changed, 291 insertions, 291 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Arc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Arc.java
index df2b9a147..2194eb672 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Arc.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Arc.java
@@ -68,7 +68,7 @@ public class Arc {
/**
* Corresponding berizer type arc
*/
- private BezierArc bezierArc;
+ private final BezierArc bezierArc;
/**
* Makes new arc at specified side
@@ -76,7 +76,7 @@ public class Arc {
* @param side
* which side doeas this arc form
*/
- public Arc(int side) {
+ public Arc(final int side) {
bezierArc = null;
pwlArc = null;
type = 0;
@@ -90,7 +90,7 @@ public class Arc {
* @param side
* arc side
*/
- private void setside(int side) {
+ private void setside(final int side) {
// DONE
clearside();
type |= side << 8;
@@ -152,7 +152,7 @@ public class Arc {
* arc to be append
* @return this
*/
- public Arc append(Arc jarc) {
+ public Arc append(final Arc jarc) {
// DONE
if (jarc != null) {
next = jarc.next;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
index c299b10af..68263b90d 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
@@ -45,7 +45,7 @@ public class ArcSdirSorter {
* Makes new ArcSdirSorter with Subdivider
* @param subdivider subdivider
*/
- public ArcSdirSorter(Subdivider subdivider) {
+ public ArcSdirSorter(final Subdivider subdivider) {
//TODO
// System.out.println("TODO arcsdirsorter.constructor");
}
@@ -55,7 +55,7 @@ public class ArcSdirSorter {
* @param list arc list to be sorted
* @param count size of list
*/
- public void qsort(CArrayOfArcs list, int count) {
+ public void qsort(final CArrayOfArcs list, final int count) {
// TODO
// System.out.println("TODO arcsdirsorter.qsort");
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
index 1a584c396..dcd7d9fdc 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
@@ -44,7 +44,7 @@ public class ArcTdirSorter {
* Makes new ArcSdirSorter with Subdivider
* @param subdivider subdivider
*/
- public ArcTdirSorter(Subdivider subdivider) {
+ public ArcTdirSorter(final Subdivider subdivider) {
// TODO Auto-generated constructor stub
// System.out.println("TODO arcTsorter.konstruktor");
}
@@ -53,7 +53,7 @@ public class ArcTdirSorter {
* @param list arc list to be sorted
* @param count size of list
*/
- public void qsort(CArrayOfArcs list, int count) {
+ public void qsort(final CArrayOfArcs list, final int count) {
// TODO Auto-generated method stub
// System.out.println("TODO arcTsorter.qsort");
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
index bd6311414..119ccbc81 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
@@ -49,9 +49,9 @@ public class ArcTesselator {
* @param t1 minimum t param
* @param t2 maximum s param
*/
- public void bezier(Arc arc, float s1, float s2, float t1, float t2) {
+ public void bezier(final Arc arc, final float s1, final float s2, final float t1, final float t2) {
// DONE
- TrimVertex[] p = new TrimVertex[2];
+ final TrimVertex[] p = new TrimVertex[2];
p[0] = new TrimVertex();
p[1] = new TrimVertex();
arc.pwlArc = new PwlArc(2, p);
@@ -70,7 +70,7 @@ public class ArcTesselator {
* @param t1 third tail
* @param f stepsize
*/
- public void pwl_right(Arc newright, float s, float t1, float t2, float f) {
+ public void pwl_right(final Arc newright, final float s, final float t1, final float t2, final float f) {
// TODO Auto-generated method stub
// System.out.println("TODO arctesselator.pwl_right");
}
@@ -83,7 +83,7 @@ public class ArcTesselator {
* @param t1 third tail
* @param f stepsize
*/
- public void pwl_left(Arc newright, float s, float t2, float t1, float f) {
+ public void pwl_left(final Arc newright, final float s, final float t2, final float t1, final float f) {
// TODO Auto-generated method stub
// System.out.println("TODO arctesselator.pwl_left");
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
index 3e974247b..bde1e2cbb 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
@@ -101,8 +101,8 @@ public abstract class Backend {
* @param ulo smallest u
* @param uhi highest u
*/
- public void curvpts(int type, CArrayOfFloats ps, int stride, int order,
- float ulo, float uhi) {
+ public void curvpts(final int type, final CArrayOfFloats ps, final int stride, final int order,
+ final float ulo, final float uhi) {
// DONE
curveEvaluator.map1f(type, ulo, uhi, stride, order, ps);
curveEvaluator.enable(type);
@@ -114,7 +114,7 @@ public abstract class Backend {
* @param u2 highest u
* @param nu number of pieces
*/
- public void curvgrid(float u1, float u2, int nu) {
+ public void curvgrid(final float u1, final float u2, final int nu) {
// DONE
curveEvaluator.mapgrid1f(nu, u1, u2);
@@ -125,7 +125,7 @@ public abstract class Backend {
* @param from low param
* @param n step
*/
- public void curvmesh(int from, int n) {
+ public void curvmesh(final int from, final int n) {
// DONE
curveEvaluator.mapmesh1f(N_MESHFILL, from, from + n);
}
@@ -135,7 +135,7 @@ public abstract class Backend {
* @param wiretris use triangles
* @param wirequads use quads
*/
- public void bgnsurf(int wiretris, int wirequads) {
+ public void bgnsurf(final int wiretris, final int wirequads) {
// DONE
surfaceEvaluator.bgnmap2f();
@@ -160,7 +160,7 @@ public abstract class Backend {
* @param vlo low v param
* @param vhi high v param
*/
- public void patch(float ulo, float uhi, float vlo, float vhi) {
+ public void patch(final float ulo, final float uhi, final float vlo, final float vhi) {
// DONE
surfaceEvaluator.domain2f(ulo, uhi, vlo, vhi);
}
@@ -174,7 +174,7 @@ public abstract class Backend {
* @param v1 highest v
* @param nv number of pieces in v direction
*/
- public void surfgrid(float u0, float u1, int nu, float v0, float v1, int nv) {
+ public void surfgrid(final float u0, final float u1, final int nu, final float v0, final float v1, final int nv) {
// DONE
surfaceEvaluator.mapgrid2f(nu, u0, u1, nv, v0, v1);
@@ -187,7 +187,7 @@ public abstract class Backend {
* @param n step in u direction
* @param m step in v direction
*/
- public void surfmesh(int u, int v, int n, int m) {
+ public void surfmesh(final int u, final int v, final int n, final int m) {
// System.out.println("TODO backend.surfmesh wireframequads");
// TODO wireframequads
surfaceEvaluator.mapmesh2f(NurbsConsts.N_MESHFILL, u, u + n, v, v + m);
@@ -206,8 +206,8 @@ public abstract class Backend {
* @param vlo lowest v
* @param vhi hightest v
*/
- public void surfpts(int type, CArrayOfFloats pts, int ustride, int vstride,
- int uorder, int vorder, float ulo, float uhi, float vlo, float vhi) {
+ public void surfpts(final int type, final CArrayOfFloats pts, final int ustride, final int vstride,
+ final int uorder, final int vorder, final float ulo, final float uhi, final float vlo, final float vhi) {
// DONE
surfaceEvaluator.map2f(type, ulo, uhi, ustride, uorder, vlo, vhi,
vstride, vorder, pts);
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Bin.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Bin.java
index 17437ef01..638b018c9 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Bin.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Bin.java
@@ -64,7 +64,7 @@ public class Bin {
* Adds and arc to linked list
* @param jarc added arc
*/
- public void addarc(Arc jarc) {
+ public void addarc(final Arc jarc) {
// DONE
// if (head == null)
// head = jarc;
@@ -93,7 +93,7 @@ public class Bin {
*/
public Arc removearc() {
// DONE
- Arc jarc = head;
+ final Arc jarc = head;
if (jarc != null)
head = jarc.link;
return jarc;
@@ -147,7 +147,7 @@ public class Bin {
*/
private Arc nextarc() {
// DONE
- Arc jarc = current;
+ final Arc jarc = current;
if (jarc != null)
current = jarc.link;
return jarc;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfArcs.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfArcs.java
index b67764c30..6d2ab362b 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfArcs.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfArcs.java
@@ -20,7 +20,7 @@ public class CArrayOfArcs {
/**
* Don't check for array borders?
*/
- private boolean noCheck = true;
+ private final boolean noCheck = true;
/**
* Makes new CArray
@@ -30,7 +30,7 @@ public class CArrayOfArcs {
* @param pointer
* pointer (index) to array
*/
- public CArrayOfArcs(Arc[] array, int pointer) {
+ public CArrayOfArcs(final Arc[] array, final int pointer) {
this.array = array;
// this.pointer=pointer;
setPointer(pointer);
@@ -42,7 +42,7 @@ public class CArrayOfArcs {
* @param carray
* reference array
*/
- public CArrayOfArcs(CArrayOfArcs carray) {
+ public CArrayOfArcs(final CArrayOfArcs carray) {
this.array = carray.array;
// this.pointer=carray.pointer;
setPointer(carray.pointer);
@@ -54,7 +54,7 @@ public class CArrayOfArcs {
* @param ctlarray
* underlaying array
*/
- public CArrayOfArcs(Arc[] ctlarray) {
+ public CArrayOfArcs(final Arc[] ctlarray) {
this.array = ctlarray;
this.pointer = 0;
}
@@ -82,7 +82,7 @@ public class CArrayOfArcs {
* @param f
* desired value
*/
- public void set(Arc f) {
+ public void set(final Arc f) {
array[pointer] = f;
}
@@ -94,7 +94,7 @@ public class CArrayOfArcs {
* array index
* @return element at index
*/
- public Arc get(int i) {
+ public Arc get(final int i) {
return array[i];
}
@@ -105,7 +105,7 @@ public class CArrayOfArcs {
* relative index
* @return element at relative index
*/
- public Arc getRelative(int i) {
+ public Arc getRelative(final int i) {
return array[pointer + i];
}
@@ -117,7 +117,7 @@ public class CArrayOfArcs {
* @param value
* value to be set
*/
- public void setRelative(int i, Arc value) {
+ public void setRelative(final int i, final Arc value) {
array[pointer + i] = value;
}
@@ -127,7 +127,7 @@ public class CArrayOfArcs {
* @param i
* lessen by
*/
- public void lessenPointerBy(int i) {
+ public void lessenPointerBy(final int i) {
// pointer-=i;
setPointer(pointer - i);
}
@@ -147,7 +147,7 @@ public class CArrayOfArcs {
* @param pointer
* pointer value to be set
*/
- public void setPointer(int pointer) {
+ public void setPointer(final int pointer) {
if (!noCheck && pointer > array.length)
throw new IllegalArgumentException("Pointer " + pointer
+ " out of bounds " + array.length);
@@ -160,7 +160,7 @@ public class CArrayOfArcs {
* @param i
* raise by
*/
- public void raisePointerBy(int i) {
+ public void raisePointerBy(final int i) {
// pointer+=i;
setPointer(pointer + i);
}
@@ -188,7 +188,7 @@ public class CArrayOfArcs {
* @param array
* underlaying array
*/
- public void setArray(Arc[] array) {
+ public void setArray(final Arc[] array) {
this.array = array;
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfBreakpts.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfBreakpts.java
index b5f588960..1c80289a3 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfBreakpts.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfBreakpts.java
@@ -10,7 +10,7 @@ public class CArrayOfBreakpts {
/**
* Underlaying array
*/
- private Breakpt[] pole;
+ private final Breakpt[] pole;
/**
* Pointer to array member
@@ -25,7 +25,7 @@ public class CArrayOfBreakpts {
* @param pointer
* pointer (index) to array
*/
- public CArrayOfBreakpts(Breakpt[] array, int pointer) {
+ public CArrayOfBreakpts(final Breakpt[] array, final int pointer) {
this.pole = array;
this.pointer = pointer;
}
@@ -36,7 +36,7 @@ public class CArrayOfBreakpts {
* @param carray
* reference array
*/
- public CArrayOfBreakpts(CArrayOfBreakpts carray) {
+ public CArrayOfBreakpts(final CArrayOfBreakpts carray) {
this.pole = carray.pole;
this.pointer = carray.pointer;
}
@@ -63,7 +63,7 @@ public class CArrayOfBreakpts {
* @param f
* desired value
*/
- public void set(Breakpt f) {
+ public void set(final Breakpt f) {
pole[pointer] = f;
}
@@ -75,7 +75,7 @@ public class CArrayOfBreakpts {
* array index
* @return element at index
*/
- public Breakpt get(int i) {
+ public Breakpt get(final int i) {
return pole[i];
}
@@ -85,7 +85,7 @@ public class CArrayOfBreakpts {
* @param i
* lessen by
*/
- public void lessenPointerBy(int i) {
+ public void lessenPointerBy(final int i) {
pointer -= i;
}
@@ -105,7 +105,7 @@ public class CArrayOfBreakpts {
* @param pointer
* pointer value to be set
*/
- public void setPointer(int pointer) {
+ public void setPointer(final int pointer) {
this.pointer = pointer;
}
@@ -115,7 +115,7 @@ public class CArrayOfBreakpts {
* @param i
* raise by
*/
- public void raisePointerBy(int i) {
+ public void raisePointerBy(final int i) {
pointer += i;
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfFloats.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfFloats.java
index d9e4d0ff1..c9d6a59ad 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfFloats.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfFloats.java
@@ -21,7 +21,7 @@ public class CArrayOfFloats {
/**
* Don't check for array borders?
*/
- private boolean noCheck = true;
+ private final boolean noCheck = true;
/**
* Makes new CArray
@@ -31,7 +31,7 @@ public class CArrayOfFloats {
* @param pointer
* pointer (index) to array
*/
- public CArrayOfFloats(float[] array, int pointer) {
+ public CArrayOfFloats(final float[] array, final int pointer) {
this.array = array;
// this.pointer=pointer;
setPointer(pointer);
@@ -43,7 +43,7 @@ public class CArrayOfFloats {
* @param carray
* reference array
*/
- public CArrayOfFloats(CArrayOfFloats carray) {
+ public CArrayOfFloats(final CArrayOfFloats carray) {
this.array = carray.array;
// this.pointer=carray.pointer;
setPointer(carray.pointer);
@@ -55,7 +55,7 @@ public class CArrayOfFloats {
* @param ctlarray
* underlaying array
*/
- public CArrayOfFloats(float[] ctlarray) {
+ public CArrayOfFloats(final float[] ctlarray) {
this.array = ctlarray;
this.pointer = 0;
}
@@ -83,7 +83,7 @@ public class CArrayOfFloats {
* @param f
* desired value
*/
- public void set(float f) {
+ public void set(final float f) {
array[pointer] = f;
}
@@ -95,7 +95,7 @@ public class CArrayOfFloats {
* array index
* @return element at index
*/
- public float get(int i) {
+ public float get(final int i) {
return array[i];
}
@@ -106,7 +106,7 @@ public class CArrayOfFloats {
* relative index
* @return element at relative index
*/
- public float getRelative(int i) {
+ public float getRelative(final int i) {
return array[pointer + i];
}
@@ -118,7 +118,7 @@ public class CArrayOfFloats {
* @param value
* value to be set
*/
- public void setRelative(int i, float value) {
+ public void setRelative(final int i, final float value) {
array[pointer + i] = value;
}
@@ -128,7 +128,7 @@ public class CArrayOfFloats {
* @param i
* lessen by
*/
- public void lessenPointerBy(int i) {
+ public void lessenPointerBy(final int i) {
// pointer-=i;
setPointer(pointer - i);
}
@@ -148,7 +148,7 @@ public class CArrayOfFloats {
* @param pointer
* pointer value to be set
*/
- public void setPointer(int pointer) {
+ public void setPointer(final int pointer) {
if (!noCheck && pointer > array.length)
throw new IllegalArgumentException("Pointer " + pointer
+ " out of bounds " + array.length);
@@ -161,7 +161,7 @@ public class CArrayOfFloats {
* @param i
* raise by
*/
- public void raisePointerBy(int i) {
+ public void raisePointerBy(final int i) {
// pointer+=i;
setPointer(pointer + i);
}
@@ -189,7 +189,7 @@ public class CArrayOfFloats {
* @param array
* underlaying array
*/
- public void setArray(float[] array) {
+ public void setArray(final float[] array) {
this.array = array;
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfQuiltspecs.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfQuiltspecs.java
index e7bbac16a..0d769004a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfQuiltspecs.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/CArrayOfQuiltspecs.java
@@ -25,7 +25,7 @@ public class CArrayOfQuiltspecs {
* @param pointer
* pointer (index) to array
*/
- public CArrayOfQuiltspecs(Quiltspec[] array, int pointer) {
+ public CArrayOfQuiltspecs(final Quiltspec[] array, final int pointer) {
this.array = array;
this.pointer = pointer;
}
@@ -36,7 +36,7 @@ public class CArrayOfQuiltspecs {
* @param carray
* reference array
*/
- public CArrayOfQuiltspecs(CArrayOfQuiltspecs carray) {
+ public CArrayOfQuiltspecs(final CArrayOfQuiltspecs carray) {
this.array = carray.array;
this.pointer = carray.pointer;
}
@@ -47,7 +47,7 @@ public class CArrayOfQuiltspecs {
* @param array
* underlaying array
*/
- public CArrayOfQuiltspecs(Quiltspec[] array) {
+ public CArrayOfQuiltspecs(final Quiltspec[] array) {
this.array = array;
this.pointer = 0;
}
@@ -74,7 +74,7 @@ public class CArrayOfQuiltspecs {
* @param f
* desired value
*/
- public void set(Quiltspec f) {
+ public void set(final Quiltspec f) {
array[pointer] = f;
}
@@ -86,7 +86,7 @@ public class CArrayOfQuiltspecs {
* array index
* @return element at index
*/
- public Quiltspec get(int i) {
+ public Quiltspec get(final int i) {
return array[i];
}
@@ -96,7 +96,7 @@ public class CArrayOfQuiltspecs {
* @param i
* lessen by
*/
- public void lessenPointerBy(int i) {
+ public void lessenPointerBy(final int i) {
pointer -= i;
}
@@ -116,7 +116,7 @@ public class CArrayOfQuiltspecs {
* @param pointer
* pointer value to be set
*/
- public void setPointer(int pointer) {
+ public void setPointer(final int pointer) {
this.pointer = pointer;
}
@@ -126,7 +126,7 @@ public class CArrayOfQuiltspecs {
* @param i
* raise by
*/
- public void raisePointerBy(int i) {
+ public void raisePointerBy(final int i) {
pointer += i;
}
@@ -154,7 +154,7 @@ public class CArrayOfQuiltspecs {
* @param array
* underlaying array
*/
- public void setArray(Quiltspec[] array) {
+ public void setArray(final Quiltspec[] array) {
this.array = array;
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
index ea3a3d14e..5fccbc598 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
@@ -59,32 +59,32 @@ public class Curve {
/**
* OpenGL maps
*/
- private Mapdesc mapdesc;
+ private final Mapdesc mapdesc;
/**
* Does the curve need sampling
*/
- private boolean needsSampling;
+ private final boolean needsSampling;
/**
* Culling
*/
- private int cullval;
+ private final int cullval;
/**
* Number of coords
*/
- private int stride;
+ private final int stride;
/**
* Curve order
*/
- private int order;
+ private final int order;
/**
* Holds conversion range borders
*/
- private float[] range;
+ private final float[] range;
/**
* Subdivision stepsize
@@ -110,7 +110,7 @@ public class Curve {
* @param c
* next curve in linked list
*/
- public Curve(Quilt geo, float[] pta, float[] ptb, Curve c) {
+ public Curve(final Quilt geo, final float[] pta, final float[] ptb, final Curve c) {
spts = new float[MAXORDER * MAXCOORDS];
@@ -125,8 +125,8 @@ public class Curve {
stride = MAXCOORDS;
// CArrayOfFloats ps = geo.cpts;
- CArrayOfFloats ps = new CArrayOfFloats(geo.cpts.getArray(), 0);
- CArrayOfQuiltspecs qs = geo.qspec;
+ final CArrayOfFloats ps = new CArrayOfFloats(geo.cpts.getArray(), 0);
+ final CArrayOfQuiltspecs qs = geo.qspec;
ps.raisePointerBy(qs.get().offset);
ps.raisePointerBy(qs.get().index * qs.get().order * qs.get().stride);
@@ -182,11 +182,11 @@ public class Curve {
} else {
assert (order <= MAXORDER);
- float tmp[][] = new float[MAXORDER][MAXCOORDS];
+ final float tmp[][] = new float[MAXORDER][MAXCOORDS];
- int tstride = (MAXORDER);
+ final int tstride = (MAXORDER);
- int val = 0;
+ final int val = 0;
// mapdesc.project(spts,stride,tmp,tstride,order);
// System.out.println("TODO curve.getsptepsize mapdesc.project");
@@ -194,7 +194,7 @@ public class Curve {
if (val == 0) {
setstepsize(mapdesc.maxrate);
} else {
- float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE);
+ final float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE);
if (mapdesc.isParametricDistanceSampling()) {
// System.out.println("TODO curve.getstepsize - parametric");
} else if (mapdesc.isPathLengthSampling()) {
@@ -212,7 +212,7 @@ public class Curve {
* Sets maximum subdivision step size
* @param max maximum subdivision step size
*/
- private void setstepsize(float max) {
+ private void setstepsize(final float max) {
// DONE
stepsize = (max >= 1) ? (range[2] / max) : range[2];
minstepsize = stepsize;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curvelist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curvelist.java
index 80baf207b..96081a8ec 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curvelist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curvelist.java
@@ -67,7 +67,7 @@ public class Curvelist {
* @param pta range start
* @param ptb range end
*/
- public Curvelist(Quilt qlist, float[] pta, float[] ptb) {
+ public Curvelist(final Quilt qlist, final float[] pta, final float[] ptb) {
// DONE
curve = null;
range = new float[3];
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
index d9d012606..e1b4cb2bb 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
@@ -49,7 +49,7 @@ public class DisplayList {
* @param m invoked method
* @param arg method argument
*/
- public void append(Object src, Method m, Object arg) {
+ public void append(final Object src, final Method m, final Object arg) {
// TODO Auto-generated method stub
// System.out.println("TODO displaylist append");
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Flist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Flist.java
index f9c4c2d6f..30f52d5cc 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Flist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Flist.java
@@ -68,7 +68,7 @@ public class Flist {
* Grows list
* @param maxpts maximum desired size
*/
- public void grow(int maxpts) {
+ public void grow(final int maxpts) {
// DONE
if (npts < maxpts) {
// npts=2*maxpts;
@@ -106,7 +106,7 @@ public class Flist {
* @param from start from
* @param to end at
*/
- public void taper(float from, float to) {
+ public void taper(final float from, final float to) {
// DONE
while (pts[start] != from) {
@@ -123,7 +123,7 @@ public class Flist {
* Adds breakpoint value
* @param f value
*/
- public void add(float f) {
+ public void add(final float f) {
//DONE
pts[end++] = f;
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
index 1dcf393a9..b7fa722ec 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
@@ -175,7 +175,7 @@ public class Knotspec {
break;
}
- CArrayOfFloats k = new CArrayOfFloats(kfirst);
+ final CArrayOfFloats k = new CArrayOfFloats(kfirst);
k.mm();
for (; k.getPointer() >= inkbegin.getPointer(); k.mm())
@@ -183,7 +183,7 @@ public class Knotspec {
break;
k.pp();
- Breakpt[] bbeginArray = new Breakpt[(klast.getPointer() - kfirst
+ final Breakpt[] bbeginArray = new Breakpt[(klast.getPointer() - kfirst
.getPointer()) + 1];
for (int i = 0; i < bbeginArray.length; i++)
bbeginArray[i] = new Breakpt();
@@ -218,7 +218,7 @@ public class Knotspec {
*/
private void factors() {
// DONE
- CArrayOfFloats mid = new CArrayOfFloats(outkend.getArray(), (outkend
+ final CArrayOfFloats mid = new CArrayOfFloats(outkend.getArray(), (outkend
.getPointer() - 1)
- order + bend.get().multi);
@@ -226,18 +226,18 @@ public class Knotspec {
if (sbegin != null)
fptr = new CArrayOfFloats(sbegin);
- for (CArrayOfBreakpts bpt = new CArrayOfBreakpts(bend); bpt
+ for (final CArrayOfBreakpts bpt = new CArrayOfBreakpts(bend); bpt
.getPointer() >= bbegin.getPointer(); bpt.mm()) {
mid.lessenPointerBy(bpt.get().multi);
- int def = bpt.get().def - 1;
+ final int def = bpt.get().def - 1;
if (def < 0)
continue;
- float kv = bpt.get().value;
+ final float kv = bpt.get().value;
- CArrayOfFloats kf = new CArrayOfFloats(mid.getArray(), (mid
+ final CArrayOfFloats kf = new CArrayOfFloats(mid.getArray(), (mid
.getPointer() - def)
+ (order - 1));
- for (CArrayOfFloats kl = new CArrayOfFloats(kf.getArray(), kf
+ for (final CArrayOfFloats kl = new CArrayOfFloats(kf.getArray(), kf
.getPointer()
+ def); kl.getPointer() != kf.getPointer(); kl.mm()) {
CArrayOfFloats kh, kt;
@@ -257,10 +257,10 @@ public class Knotspec {
*/
private void knots() {
// DONE
- CArrayOfFloats inkpt = new CArrayOfFloats(kleft.getArray(), kleft
+ final CArrayOfFloats inkpt = new CArrayOfFloats(kleft.getArray(), kleft
.getPointer()
- order);
- CArrayOfFloats inkend = new CArrayOfFloats(kright.getArray(), kright
+ final CArrayOfFloats inkend = new CArrayOfFloats(kright.getArray(), kright
.getPointer()
+ bend.get().def);
@@ -279,8 +279,8 @@ public class Knotspec {
*/
private void breakpoints() {
// DONE
- CArrayOfBreakpts ubpt = new CArrayOfBreakpts(bbegin);
- CArrayOfBreakpts ubend = new CArrayOfBreakpts(bend);
+ final CArrayOfBreakpts ubpt = new CArrayOfBreakpts(bbegin);
+ final CArrayOfBreakpts ubend = new CArrayOfBreakpts(bend);
int nfactors = 0;
ubpt.get().value = ubend.get().value;
@@ -320,13 +320,13 @@ public class Knotspec {
* @param _outpt
* output control points
*/
- public void copy(CArrayOfFloats _inpt, CArrayOfFloats _outpt) {
- CArrayOfFloats inpt = new CArrayOfFloats(_inpt);
- CArrayOfFloats outpt = new CArrayOfFloats(_outpt);
+ public void copy(final CArrayOfFloats _inpt, final CArrayOfFloats _outpt) {
+ final CArrayOfFloats inpt = new CArrayOfFloats(_inpt);
+ final CArrayOfFloats outpt = new CArrayOfFloats(_outpt);
inpt.raisePointerBy(preoffset);
if (next != null) {
- for (CArrayOfFloats lpt = new CArrayOfFloats(outpt.getArray(),
+ for (final CArrayOfFloats lpt = new CArrayOfFloats(outpt.getArray(),
outpt.getPointer() + prewidth); outpt.getPointer() != lpt
.getPointer(); outpt.raisePointerBy(poststride)) {
next.copy(inpt, outpt);
@@ -334,7 +334,7 @@ public class Knotspec {
}
} else {
- for (CArrayOfFloats lpt = new CArrayOfFloats(outpt.getArray(),
+ for (final CArrayOfFloats lpt = new CArrayOfFloats(outpt.getArray(),
outpt.getPointer() + prewidth); outpt.getPointer() != lpt
.getPointer(); outpt.raisePointerBy(poststride)) {
pt_io_copy(outpt, inpt);
@@ -352,7 +352,7 @@ public class Knotspec {
* @param frompt
* destination control point
*/
- private void pt_io_copy(CArrayOfFloats topt, CArrayOfFloats frompt) {
+ private void pt_io_copy(final CArrayOfFloats topt, final CArrayOfFloats frompt) {
// DONE
switch (ncoords) {
case 4:
@@ -378,8 +378,8 @@ public class Knotspec {
* @param _p
* inserted knot
*/
- public void transform(CArrayOfFloats _p) {
- CArrayOfFloats p = new CArrayOfFloats(_p);
+ public void transform(final CArrayOfFloats _p) {
+ final CArrayOfFloats p = new CArrayOfFloats(_p);
// DONE
if (next != null) {//surface code
if (this.equals(kspectotrans)) {
@@ -387,13 +387,13 @@ public class Knotspec {
} else {
if (istransformed) {
p.raisePointerBy(postoffset);
- for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
+ for (final CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
p.getPointer() + postwidth); p.getPointer() != pend
.getPointer(); p.raisePointerBy(poststride))
next.transform(p);
} else {
- CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), p
+ final CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), p
.getPointer()
+ prewidth);
for (; p.getPointer() != pend.getPointer(); p
@@ -408,13 +408,13 @@ public class Knotspec {
} else {
if (istransformed) {
p.raisePointerBy(postoffset);
- for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
+ for (final CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
p.getPointer() + postwidth); p.getPointer() != pend
.getPointer(); p.raisePointerBy(poststride)) {
kspectotrans.insert(p);
}
} else {
- CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), p
+ final CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), p
.getPointer()
+ prewidth);
for (; p.getPointer() != pend.getPointer(); p
@@ -432,27 +432,27 @@ public class Knotspec {
* @param p
* inserted knot
*/
- private void insert(CArrayOfFloats p) {
+ private void insert(final CArrayOfFloats p) {
// DONE
CArrayOfFloats fptr = null;
if (sbegin != null)
fptr = new CArrayOfFloats(sbegin);
- CArrayOfFloats srcpt = new CArrayOfFloats(p.getArray(), p.getPointer()
+ final CArrayOfFloats srcpt = new CArrayOfFloats(p.getArray(), p.getPointer()
+ prewidth - poststride);
// CArrayOfFloats srcpt = new CArrayOfFloats(p.getArray(), prewidth -
// poststride);
- CArrayOfFloats dstpt = new CArrayOfFloats(p.getArray(), p.getPointer()
+ final CArrayOfFloats dstpt = new CArrayOfFloats(p.getArray(), p.getPointer()
+ postwidth + postoffset - poststride);
// CArrayOfFloats dstpt = new CArrayOfFloats(p.getArray(), postwidth +
// postoffset - poststride);
- CArrayOfBreakpts bpt = new CArrayOfBreakpts(bend);
+ final CArrayOfBreakpts bpt = new CArrayOfBreakpts(bend);
- for (CArrayOfFloats pend = new CArrayOfFloats(srcpt.getArray(), srcpt
+ for (final CArrayOfFloats pend = new CArrayOfFloats(srcpt.getArray(), srcpt
.getPointer()
- poststride * bpt.get().def); srcpt.getPointer() != pend
.getPointer(); pend.raisePointerBy(poststride)) {
- CArrayOfFloats p1 = new CArrayOfFloats(srcpt);
- for (CArrayOfFloats p2 = new CArrayOfFloats(srcpt.getArray(), srcpt
+ final CArrayOfFloats p1 = new CArrayOfFloats(srcpt);
+ for (final CArrayOfFloats p2 = new CArrayOfFloats(srcpt.getArray(), srcpt
.getPointer()
- poststride); p2.getPointer() != pend.getPointer(); p1
.setPointer(p2.getPointer()), p2
@@ -469,15 +469,15 @@ public class Knotspec {
dstpt.lessenPointerBy(poststride);
srcpt.lessenPointerBy(poststride);
}
- for (CArrayOfFloats pend = new CArrayOfFloats(srcpt.getArray(),
+ for (final CArrayOfFloats pend = new CArrayOfFloats(srcpt.getArray(),
srcpt.getPointer() - poststride * bpt.get().def); srcpt
.getPointer() != pend.getPointer(); pend
.raisePointerBy(poststride), dstpt
.lessenPointerBy(poststride)) {
pt_oo_copy(dstpt, srcpt);
- CArrayOfFloats p1 = new CArrayOfFloats(srcpt);
+ final CArrayOfFloats p1 = new CArrayOfFloats(srcpt);
- for (CArrayOfFloats p2 = new CArrayOfFloats(srcpt.getArray(),
+ for (final CArrayOfFloats p2 = new CArrayOfFloats(srcpt.getArray(),
srcpt.getPointer() - poststride); p2.getPointer() != pend
.getPointer(); p1.setPointer(p2.getPointer()), p2
.lessenPointerBy(poststride)) {
@@ -496,7 +496,7 @@ public class Knotspec {
* @param frompt
* distance ctrl point
*/
- private void pt_oo_copy(CArrayOfFloats topt, CArrayOfFloats frompt) {
+ private void pt_oo_copy(final CArrayOfFloats topt, final CArrayOfFloats frompt) {
// DONE
// this is a "trick" with case - "break" is omitted so it comes through all cases
switch (ncoords) {
@@ -531,8 +531,8 @@ public class Knotspec {
* @param b
* 1 - alpha
*/
- private void pt_oo_sum(CArrayOfFloats x, CArrayOfFloats y,
- CArrayOfFloats z, float a, double b) {
+ private void pt_oo_sum(final CArrayOfFloats x, final CArrayOfFloats y,
+ final CArrayOfFloats z, final float a, final double b) {
// DONE
switch (ncoords) {
case 4:
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
index 571f44f06..76b59231c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
@@ -85,7 +85,7 @@ public class Knotvector {
* @param knot
* knots
*/
- public Knotvector(int nknots, int stride, int order, float[] knot) {
+ public Knotvector(final int nknots, final int stride, final int order, final float[] knot) {
// DONE
init(nknots, stride, order, knot);
}
@@ -102,7 +102,7 @@ public class Knotvector {
* @param knot
* knots
*/
- public void init(int nknots, int stride, int order, float[] knot) {
+ public void init(final int nknots, final int stride, final int order, final float[] knot) {
// DONE
this.knotcount = nknots;
this.stride = stride;
@@ -158,7 +158,7 @@ public class Knotvector {
* @param msg
* message to be shown
*/
- public void show(String msg) {
+ public void show(final String msg) {
// TODO Auto-generated method stub
// System.out.println("TODO knotvector.show");
@@ -173,7 +173,7 @@ public class Knotvector {
* second knot
* @return knots are/are not equal
*/
- public static boolean identical(float a, float b) {
+ public static boolean identical(final float a, final float b) {
return ((a - b) < TOLERANCE) ? true : false;
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
index 86638a827..95ce60c25 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
@@ -64,22 +64,22 @@ public class Mapdesc {
/**
* Map type
*/
- private int type;
+ private final int type;
/**
* Number of homogenous coords
*/
- private int hcoords;
+ private final int hcoords;
/**
* Number of inhomogenous coords
*/
- private int inhcoords;
+ private final int inhcoords;
/**
* Not used
*/
- private int mask;
+ private final int mask;
/**
* Value of N_PIXEL_TOLERANCE property
@@ -144,22 +144,22 @@ public class Mapdesc {
/**
* Not used
*/
- private float[][] bmat;
+ private final float[][] bmat;
/**
* Sampling matrix
*/
- private float[][] smat;
+ private final float[][] smat;
/**
* Not used
*/
- private float[][] cmat;
+ private final float[][] cmat;
/**
* Not used
*/
- private float[] bboxsize;
+ private final float[] bboxsize;
/**
* Makes new mapdesc
@@ -168,7 +168,7 @@ public class Mapdesc {
* @param ncoords number of control points coords
* @param backend backend object
*/
- public Mapdesc(int type, int rational, int ncoords, Backend backend) {
+ public Mapdesc(final int type, final int rational, final int ncoords, final Backend backend) {
// DONE
this.type = type;
this.isrational = rational;
@@ -210,7 +210,7 @@ public class Mapdesc {
* Make matrix identity matrix
* @param arr matrix
*/
- private void identify(float[][] arr) {
+ private void identify(final float[][] arr) {
// DONE
for (int i = 0; i < MAXCOORDS; i++)
for (int j = 0; j < MAXCOORDS; j++)
@@ -225,7 +225,7 @@ public class Mapdesc {
* @param tag property tag
* @return is/is not property
*/
- public boolean isProperty(int tag) {
+ public boolean isProperty(final int tag) {
boolean ret;
switch (tag) {
case NurbsConsts.N_PIXEL_TOLERANCE:
@@ -347,7 +347,7 @@ public class Mapdesc {
* @param tag property tag
* @return property value
*/
- public float getProperty(int tag) {
+ public float getProperty(final int tag) {
// TODO Auto-generated method stub
// System.out.println("TODO mapdesc.getproperty");
return 0;
@@ -358,7 +358,7 @@ public class Mapdesc {
* @param tag property tag
* @param value desired value
*/
- public void setProperty(int tag, float value) {
+ public void setProperty(final int tag, float value) {
// TODO Auto-generated method stub
switch (tag) {
case NurbsConsts.N_PIXEL_TOLERANCE:
@@ -412,8 +412,8 @@ public class Mapdesc {
* @param sp breakpoints
* @param outstride output number of control points' coordinates
*/
- public void xformSampling(CArrayOfFloats pts, int order, int stride,
- float[] sp, int outstride) {
+ public void xformSampling(final CArrayOfFloats pts, final int order, final int stride,
+ final float[] sp, final int outstride) {
// DONE
xFormMat(smat, pts, order, stride, sp, outstride);
}
@@ -427,8 +427,8 @@ public class Mapdesc {
* @param cp breakpoints
* @param outstride output number of control points' coordinates
*/
- private void xFormMat(float[][] mat, CArrayOfFloats pts, int order,
- int stride, float[] cp, int outstride) {
+ private void xFormMat(final float[][] mat, final CArrayOfFloats pts, final int order,
+ final int stride, final float[] cp, final int outstride) {
// TODO Auto-generated method stub
// System.out.println("TODO mapdsc.xformmat ; change cp from float[] to carrayoffloats");
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
index af8024109..7f9d7c5a0 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
@@ -48,13 +48,13 @@ public class Maplist {
/**
* Backend class
*/
- private Backend backend;
+ private final Backend backend;
/**
* Makes new Maplist
* @param backend Backend class
*/
- public Maplist(Backend backend) {
+ public Maplist(final Backend backend) {
this.backend = backend;
}
@@ -72,9 +72,9 @@ public class Maplist {
* @param rational is map rational
* @param ncoords number of coords
*/
- public void define(int type, int rational, int ncoords) {
+ public void define(final int type, final int rational, final int ncoords) {
// DONE
- Mapdesc m = locate(type);
+ final Mapdesc m = locate(type);
assert (m == null || (m.isrational == rational && m.ncoords == ncoords));
add(type, rational, ncoords);
@@ -86,9 +86,9 @@ public class Maplist {
* @param rational is map rational
* @param ncoords number of coords
*/
- private void add(int type, int rational, int ncoords) {
+ private void add(final int type, final int rational, final int ncoords) {
// DONE
- Mapdesc map = new Mapdesc(type, rational, ncoords, backend);
+ final Mapdesc map = new Mapdesc(type, rational, ncoords, backend);
if (maps == null) {
maps = map;
} else {
@@ -102,7 +102,7 @@ public class Maplist {
* @param type map type
* @return Mapdesc of type or null if there is no such map
*/
- public Mapdesc locate(int type) {
+ public Mapdesc locate(final int type) {
// DONE
Mapdesc m = null;
for (m = maps; m != null; m = m.next)
@@ -116,7 +116,7 @@ public class Maplist {
* @param type maptype
* @return Mapdesc of type or null if there is no such map
*/
- public Mapdesc find(int type) {
+ public Mapdesc find(final int type) {
return locate(type);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbscurve.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbscurve.java
index a686da696..a957c21a8 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbscurve.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbscurve.java
@@ -70,7 +70,7 @@ public class O_nurbscurve {
* Makes new O_nurbscurve
* @param realType type of curve
*/
- public O_nurbscurve(int realType) {
+ public O_nurbscurve(final int realType) {
// DONE
this.type = realType;
this.owner = null;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbssurface.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbssurface.java
index 867f43657..4df3c14ca 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbssurface.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/O_nurbssurface.java
@@ -64,13 +64,13 @@ public class O_nurbssurface {
/**
* Surface type
*/
- private int type;
+ private final int type;
/**
* Makes new O_nurbssurface of type
* @param type surface type
*/
- public O_nurbssurface(int type) {
+ public O_nurbssurface(final int type) {
this.type = type;
this.owner = null;
this.next = null;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
index a44f2451c..0fd4baa81 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
@@ -48,7 +48,7 @@ public class Patch {
* @param ptb
* @param patch
*/
- public Patch(Quilt q, float[] pta, float[] ptb, Patch patch) {
+ public Patch(final Quilt q, final float[] pta, final float[] ptb, final Patch patch) {
// System.out.println("TODO patch.constructor");
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
index 240c905a2..68b01d8d0 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
@@ -57,7 +57,7 @@ public class Patchlist {
* @param pta low border
* @param ptb high border
*/
- public Patchlist(Quilt quilts, float[] pta, float[] ptb) {
+ public Patchlist(final Quilt quilts, final float[] pta, final float[] ptb) {
// DONE
patch = null;
@@ -81,7 +81,7 @@ public class Patchlist {
* @param param
* @param mid
*/
- public Patchlist(Patchlist patchlist, int param, float mid) {
+ public Patchlist(final Patchlist patchlist, final int param, final float mid) {
// TODO Auto-generated constructor stub
// System.out.println("TODO patchlist.konstruktor 2");
}
@@ -120,7 +120,7 @@ public class Patchlist {
* @param i
* @return false
*/
- public boolean needsSubdivision(int i) {
+ public boolean needsSubdivision(final int i) {
// TODO Auto-generated method stub
// System.out.println("TODO patchlist.needsSubdivision");
return false;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Property.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Property.java
index 79f36ce43..155549bce 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Property.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Property.java
@@ -67,7 +67,7 @@ public class Property {
* @param value
* property value
*/
- public Property(int type, int tag, float value) {
+ public Property(final int type, final int tag, final float value) {
this.type = type;
this.tag = tag;
this.value = value;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/PwlArc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/PwlArc.java
index bcbd20a16..8e04baf88 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/PwlArc.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/PwlArc.java
@@ -44,7 +44,7 @@ public class PwlArc {
/**
* Number of points
*/
- private int npts;
+ private final int npts;
/**
* Vertexes
@@ -54,14 +54,14 @@ public class PwlArc {
/**
* Arc type
*/
- private int type;
+ private final int type;
/**
* Makes new trimming arc
* @param i num ber of vertexes
* @param p trimming vertexes array
*/
- public PwlArc(int i, TrimVertex[] p) {
+ public PwlArc(final int i, final TrimVertex[] p) {
// DONE
this.npts = i;
this.pts = p;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
index 6bea4928c..2e2532a35 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
@@ -74,10 +74,10 @@ public class Quilt {
* Makes new quilt with mapdesc
* @param mapdesc map description
*/
- public Quilt(Mapdesc mapdesc) {
+ public Quilt(final Mapdesc mapdesc) {
// DONE
this.mapdesc = mapdesc;
- Quiltspec[] tmpquilts = new Quiltspec[MAXDIM];
+ final Quiltspec[] tmpquilts = new Quiltspec[MAXDIM];
for (int i = 0; i < tmpquilts.length; i++)
tmpquilts[i] = new Quiltspec();
this.qspec = new CArrayOfQuiltspecs(tmpquilts);
@@ -91,9 +91,9 @@ public class Quilt {
* @param ctrlarr control points
* @param coords control points coords
*/
- public void toBezier(Knotvector sknotvector, Knotvector tknotvector,
- CArrayOfFloats ctrlarr, int coords) {
- Splinespec spline = new Splinespec(2);
+ public void toBezier(final Knotvector sknotvector, final Knotvector tknotvector,
+ final CArrayOfFloats ctrlarr, final int coords) {
+ final Splinespec spline = new Splinespec(2);
spline.kspecinit(sknotvector, tknotvector);
spline.select();
spline.layout(coords);
@@ -108,9 +108,9 @@ public class Quilt {
* @param ctlarray control points
* @param ncoords number of coordinates
*/
- public void toBezier(Knotvector knots, CArrayOfFloats ctlarray, int ncoords) {
+ public void toBezier(final Knotvector knots, final CArrayOfFloats ctlarray, final int ncoords) {
// DONE
- Splinespec spline = new Splinespec(1);
+ final Splinespec spline = new Splinespec(1);
spline.kspecinit(knots);
spline.select();
spline.layout(ncoords);
@@ -125,7 +125,7 @@ public class Quilt {
* @param ptb high border
* @param backend Backend
*/
- public void downloadAll(float[] pta, float[] ptb, Backend backend) {
+ public void downloadAll(final float[] pta, final float[] ptb, final Backend backend) {
// DONE
for (Quilt m = this; m != null; m = m.next) {
m.select(pta, ptb);
@@ -138,11 +138,11 @@ public class Quilt {
* Renders arcs/patches
* @param backend Backend for rendering
*/
- private void download(Backend backend) {
+ private void download(final Backend backend) {
// DONE
if (getDimension() == 2) {
- CArrayOfFloats ps = new CArrayOfFloats(cpts);
+ final CArrayOfFloats ps = new CArrayOfFloats(cpts);
ps.raisePointerBy(qspec.get(0).offset);
ps.raisePointerBy(qspec.get(1).offset);
ps.raisePointerBy(qspec.get(0).index * qspec.get(0).order
@@ -159,7 +159,7 @@ public class Quilt {
} else {// code for curves
// CArrayOfFloats ps=new CArrayOfFloats(cpts);
- CArrayOfFloats ps = new CArrayOfFloats(cpts.getArray(), 0);
+ final CArrayOfFloats ps = new CArrayOfFloats(cpts.getArray(), 0);
ps.raisePointerBy(qspec.get(0).offset);
ps.raisePointerBy(qspec.get(0).index * qspec.get(0).order
* qspec.get(0).stride);
@@ -185,9 +185,9 @@ public class Quilt {
* @param pta range
* @param ptb range
*/
- private void select(float[] pta, float[] ptb) {
+ private void select(final float[] pta, final float[] ptb) {
// DONE
- int dim = eqspec.getPointer() - qspec.getPointer();
+ final int dim = eqspec.getPointer() - qspec.getPointer();
int i, j;
for (i = 0; i < dim; i++) {
for (j = qspec.get(i).width - 1; j >= 0; j--)
@@ -205,7 +205,7 @@ public class Quilt {
* @param to high param
* @param bpts breakpoints
*/
- public void getRange(float[] from, float[] to, Flist bpts) {
+ public void getRange(final float[] from, final float[] to, final Flist bpts) {
// DONE
getRange(from, to, 0, bpts);
@@ -218,9 +218,9 @@ public class Quilt {
* @param i from/to array index
* @param list breakpoints
*/
- private void getRange(float[] from, float[] to, int i, Flist list) {
+ private void getRange(final float[] from, final float[] to, final int i, final Flist list) {
// DONE
- Quilt maps = this;
+ final Quilt maps = this;
from[i] = maps.qspec.get(i).breakpoints[0];
to[i] = maps.qspec.get(i).breakpoints[maps.qspec.get(i).width];
int maxpts = 0;
@@ -262,7 +262,7 @@ public class Quilt {
* @param slist u direction breakpoints
* @param tlist v direction breakpoints
*/
- public void getRange(float[] from, float[] to, Flist slist, Flist tlist) {
+ public void getRange(final float[] from, final float[] to, final Flist slist, final Flist tlist) {
// DONE
getRange(from, to, 0, slist);
getRange(from, to, 1, tlist);
@@ -275,7 +275,7 @@ public class Quilt {
* @param tbrkpts
* @param rate
*/
- public void findRates(Flist sbrkpts, Flist tbrkpts, float[] rate) {
+ public void findRates(final Flist sbrkpts, final Flist tbrkpts, final float[] rate) {
// TODO Auto-generated method stub
// System.out.println("TODO quilt.findrates");
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Renderhints.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Renderhints.java
index 7c636122f..5c180f345 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Renderhints.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Renderhints.java
@@ -85,7 +85,7 @@ public class Renderhints {
* Set property value
* @param prop property
*/
- public void setProperty(Property prop) {
+ public void setProperty(final Property prop) {
switch (prop.type) {
case NurbsConsts.N_DISPLAY:
display_method = (int) prop.value;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java
index f1c779c2f..5e44c3259 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java
@@ -44,7 +44,7 @@ public class Splinespec {
/**
* Dimension
*/
- private int dim;
+ private final int dim;
/**
* Knot vector specs
@@ -60,7 +60,7 @@ public class Splinespec {
* Makes new Splinespec with given dimension
* @param i dimension
*/
- public Splinespec(int i) {
+ public Splinespec(final int i) {
// DONE
this.dim = i;
}
@@ -69,7 +69,7 @@ public class Splinespec {
* Initializes knotspec according to knotvector
* @param knotvector basic knotvector
*/
- public void kspecinit(Knotvector knotvector) {
+ public void kspecinit(final Knotvector knotvector) {
// DONE
this.kspec = new Knotspec();
kspec.inkbegin = new CArrayOfFloats(knotvector.knotlist, 0);
@@ -85,10 +85,10 @@ public class Splinespec {
* @param sknotvector knotvector in u dir
* @param tknotvector knotvector in v dir
*/
- public void kspecinit(Knotvector sknotvector, Knotvector tknotvector) {
+ public void kspecinit(final Knotvector sknotvector, final Knotvector tknotvector) {
// DONE
this.kspec = new Knotspec();
- Knotspec tkspec = new Knotspec();
+ final Knotspec tkspec = new Knotspec();
kspec.inkbegin = new CArrayOfFloats(sknotvector.knotlist, 0);
kspec.inkend = new CArrayOfFloats(sknotvector.knotlist,
@@ -121,7 +121,7 @@ public class Splinespec {
* Prepares for conversion
* @param ncoords number of coords
*/
- public void layout(int ncoords) {
+ public void layout(final int ncoords) {
// DONE
int stride = ncoords;
for (Knotspec knotspec = kspec; knotspec != null; knotspec = knotspec.next) {
@@ -143,9 +143,9 @@ public class Splinespec {
* Prepares quilt for conversion
* @param quilt quilt to work with
*/
- public void setupquilt(Quilt quilt) {
+ public void setupquilt(final Quilt quilt) {
// DONE
- CArrayOfQuiltspecs qspec = new CArrayOfQuiltspecs(quilt.qspec);
+ final CArrayOfQuiltspecs qspec = new CArrayOfQuiltspecs(quilt.qspec);
quilt.eqspec = new CArrayOfQuiltspecs(qspec.getArray(), dim);
for (Knotspec knotspec = kspec; knotspec != null;) {
qspec.get().stride = knotspec.poststride;
@@ -159,8 +159,8 @@ public class Splinespec {
qspec.get().bdry[1] = (knotspec.kright.getPointer() == knotspec.klast
.getPointer()) ? 1 : 0;
qspec.get().breakpoints = new float[qspec.get().width + 1];
- CArrayOfFloats k = new CArrayOfFloats(qspec.get().breakpoints, 0);
- for (CArrayOfBreakpts bk = new CArrayOfBreakpts(knotspec.bbegin); bk
+ final CArrayOfFloats k = new CArrayOfFloats(qspec.get().breakpoints, 0);
+ for (final CArrayOfBreakpts bk = new CArrayOfBreakpts(knotspec.bbegin); bk
.getPointer() <= knotspec.bend.getPointer(); bk.pp()) {
k.set(bk.get().value);
k.pp();
@@ -177,7 +177,7 @@ public class Splinespec {
* Copies array of control points to output array
* @param ctlarray control points array
*/
- public void copy(CArrayOfFloats ctlarray) {
+ public void copy(final CArrayOfFloats ctlarray) {
// DONE
kspec.copy(ctlarray, outcpts);
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
index 4d8296cca..d7c1dbf3c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
@@ -148,7 +148,7 @@ public class Subdivider {
/**
* Initializes quilt list
*/
- public void beginQuilts(Backend backend) {
+ public void beginQuilts(final Backend backend) {
// DONE
qlist = null;
renderhints = new Renderhints();
@@ -162,7 +162,7 @@ public class Subdivider {
* Adds quilt to linked list
* @param quilt added quilt
*/
- public void addQuilt(Quilt quilt) {
+ public void addQuilt(final Quilt quilt) {
// DONE
if (qlist == null)
qlist = quilt;
@@ -198,8 +198,8 @@ public class Subdivider {
}
}
- float[] from = new float[2];
- float[] to = new float[2];
+ final float[] from = new float[2];
+ final float[] to = new float[2];
spbrkpts = new Flist();
tpbrkpts = new Flist();
@@ -215,7 +215,7 @@ public class Subdivider {
makeBorderTrim(from, to);
}
} else {
- float[] rate = new float[2];
+ final float[] rate = new float[2];
qlist.findRates(spbrkpts, tpbrkpts, rate);
// System.out.println("subdivider.drawsurfaces decompose");
}
@@ -231,8 +231,8 @@ public class Subdivider {
int num_v_steps;
for (i = spbrkpts.start; i < spbrkpts.end - 1; i++) {
for (j = tpbrkpts.start; j < tpbrkpts.end - 1; j++) {
- float[] pta = new float[2];
- float[] ptb = new float[2];
+ final float[] pta = new float[2];
+ final float[] ptb = new float[2];
pta[0] = spbrkpts.pts[i];
ptb[0] = spbrkpts.pts[i + 1];
@@ -266,7 +266,7 @@ public class Subdivider {
* Empty method
* @param initialbin2
*/
- private void freejarcs(Bin initialbin2) {
+ private void freejarcs(final Bin initialbin2) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.freejarcs");
}
@@ -275,7 +275,7 @@ public class Subdivider {
* Subdivide in U direction
* @param source Trimming arcs source
*/
- private void subdivideInS(Bin source) {
+ private void subdivideInS(final Bin source) {
// DONE
if (renderhints.display_method == NurbsConsts.N_OUTLINE_PARAM) {
outline(source);
@@ -294,13 +294,13 @@ public class Subdivider {
* @param start breakpoints start
* @param end breakpoints end
*/
- private void splitInS(Bin source, int start, int end) {
+ private void splitInS(final Bin source, final int start, final int end) {
// DONE
if (source.isnonempty()) {
if (start != end) {
- int i = start + (end - start) / 2;
- Bin left = new Bin();
- Bin right = new Bin();
+ final int i = start + (end - start) / 2;
+ final Bin left = new Bin();
+ final Bin right = new Bin();
split(source, left, right, 0, spbrkpts.pts[i]);
splitInS(left, start, i);
@@ -329,15 +329,15 @@ public class Subdivider {
* @param start
* @param end
*/
- private void splitInT(Bin source, int start, int end) {
+ private void splitInT(final Bin source, final int start, final int end) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.splitint");
if (source.isnonempty()) {
if (start != end) {
- int i = start + (end - start) / 2;
- Bin left = new Bin();
- Bin right = new Bin();
+ final int i = start + (end - start) / 2;
+ final Bin left = new Bin();
+ final Bin right = new Bin();
split(source, left, right, 1, tpbrkpts.pts[i + 1]);
splitInT(left, start, i);
splitInT(right, i + 1, end);
@@ -352,8 +352,8 @@ public class Subdivider {
setArcTypeBezier();
setDegenerate();
- float[] pta = new float[2];
- float[] ptb = new float[2];
+ final float[] pta = new float[2];
+ final float[] ptb = new float[2];
pta[0] = spbrkpts.pts[s_index - 1];
pta[1] = tpbrkpts.pts[t_index - 1];
@@ -362,7 +362,7 @@ public class Subdivider {
ptb[1] = tpbrkpts.pts[t_index];
qlist.downloadAll(pta, ptb, backend);
- Patchlist patchlist = new Patchlist(qlist, pta, ptb);
+ final Patchlist patchlist = new Patchlist(qlist, pta, ptb);
samplingSplit(source, patchlist,
renderhints.maxsubdivisions, 0);
@@ -381,8 +381,8 @@ public class Subdivider {
* @param subdivisions
* @param param
*/
- private void samplingSplit(Bin source, Patchlist patchlist,
- int subdivisions, int param) {
+ private void samplingSplit(final Bin source, final Patchlist patchlist,
+ final int subdivisions, int param) {
// DONE
if (!source.isnonempty())
return;
@@ -408,13 +408,13 @@ public class Subdivider {
else
param = 1 - param;
- Bin left = new Bin();
- Bin right = new Bin();
+ final Bin left = new Bin();
+ final Bin right = new Bin();
- float mid = (float) ((patchlist.pspec[param].range[0] + patchlist.pspec[param].range[1]) * .5);
+ final float mid = (float) ((patchlist.pspec[param].range[0] + patchlist.pspec[param].range[1]) * .5);
split(source, left, right, param, mid);
- Patchlist subpatchlist = new Patchlist(patchlist, param, mid);
+ final Patchlist subpatchlist = new Patchlist(patchlist, param, mid);
samplingSplit(left, subpatchlist, subdivisions - 1, param);
samplingSplit(right, subpatchlist, subdivisions - 1, param);
} else {
@@ -433,18 +433,18 @@ public class Subdivider {
* @param subdivisions
* @param param
*/
- private void nonSamplingSplit(Bin source, Patchlist patchlist,
- int subdivisions, int param) {
+ private void nonSamplingSplit(final Bin source, final Patchlist patchlist,
+ final int subdivisions, int param) {
// DONE
if (patchlist.needsNonSamplingSubdivision() && subdivisions > 0) {
param = 1 - param;
- Bin left = new Bin();
- Bin right = new Bin();
+ final Bin left = new Bin();
+ final Bin right = new Bin();
- float mid = (float) ((patchlist.pspec[param].range[0] + patchlist.pspec[param].range[1]) * .5);
+ final float mid = (float) ((patchlist.pspec[param].range[0] + patchlist.pspec[param].range[1]) * .5);
split(source, left, right, param, mid);
- Patchlist subpatchlist = new Patchlist(patchlist, param, mid);
+ final Patchlist subpatchlist = new Patchlist(patchlist, param, mid);
if (left.isnonempty()) {
if (subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT)
freejarcs(left);
@@ -483,7 +483,7 @@ public class Subdivider {
* @param start
* @param end
*/
- private void monosplitInS(Bin source, int start, int end) {
+ private void monosplitInS(final Bin source, final int start, final int end) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.monosplitins");
}
@@ -492,7 +492,7 @@ public class Subdivider {
* Not used
* @param source
*/
- private void findIrregularS(Bin source) {
+ private void findIrregularS(final Bin source) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.findIrregularS");
}
@@ -510,7 +510,7 @@ public class Subdivider {
* @param source
* @param patchlist
*/
- private void tesselation(Bin source, Patchlist patchlist) {
+ private void tesselation(final Bin source, final Patchlist patchlist) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.tesselation");
}
@@ -531,19 +531,19 @@ public class Subdivider {
* @param param
* @param value
*/
- private void split(Bin bin, Bin left, Bin right, int param, float value) {
+ private void split(final Bin bin, final Bin left, final Bin right, final int param, final float value) {
// DONE
- Bin intersections = new Bin();
- Bin unknown = new Bin();
+ final Bin intersections = new Bin();
+ final Bin unknown = new Bin();
partition(bin, left, intersections, right, unknown, param, value);
- int count = intersections.numarcs();
+ final int count = intersections.numarcs();
// TODO jumpbuffer ??
if (count % 2 == 0) {
- Arc[] arclist = new Arc[MAXARCS];
+ final Arc[] arclist = new Arc[MAXARCS];
CArrayOfArcs list;
if (count >= MAXARCS) {
list = new CArrayOfArcs(new Arc[count]);
@@ -559,7 +559,7 @@ public class Subdivider {
last.set(jarc);
if (param == 0) {// sort into incrasing t order
- ArcSdirSorter sorter = new ArcSdirSorter(this);
+ final ArcSdirSorter sorter = new ArcSdirSorter(this);
sorter.qsort(list, count);
for (lptr = new CArrayOfArcs(list); lptr.getPointer() < last
@@ -578,7 +578,7 @@ public class Subdivider {
}
} else {// sort into decreasing s order
- ArcTdirSorter sorter = new ArcTdirSorter(this);
+ final ArcTdirSorter sorter = new ArcTdirSorter(this);
sorter.qsort(list, count);
for (lptr = new CArrayOfArcs(list); lptr.getPointer() < last
@@ -609,7 +609,7 @@ public class Subdivider {
* @param arc
* @param relative
*/
- private void join_t(Bin left, Bin right, Arc arc, Arc relative) {
+ private void join_t(final Bin left, final Bin right, final Arc arc, final Arc relative) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.join_t");
}
@@ -619,7 +619,7 @@ public class Subdivider {
* @param arc
* @param relative
*/
- private void check_t(Arc arc, Arc relative) {
+ private void check_t(final Arc arc, final Arc relative) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.check_t");
}
@@ -631,22 +631,22 @@ public class Subdivider {
* @param jarc1
* @param jarc2
*/
- private void join_s(Bin left, Bin right, Arc jarc1, Arc jarc2) {
+ private void join_s(final Bin left, final Bin right, Arc jarc1, Arc jarc2) {
// DONE
if (!jarc1.getitail())
jarc1 = jarc1.next;
if (!jarc2.getitail())
jarc2 = jarc2.next;
- float s = jarc1.tail()[0];
- float t1 = jarc1.tail()[1];
- float t2 = jarc2.tail()[1];
+ final float s = jarc1.tail()[0];
+ final float t1 = jarc1.tail()[1];
+ final float t2 = jarc2.tail()[1];
if (t1 == t2) {
simplelink(jarc1, jarc2);
} else {
- Arc newright = new Arc(Arc.ARC_RIGHT);
- Arc newleft = new Arc(Arc.ARC_LEFT);
+ final Arc newright = new Arc(Arc.ARC_RIGHT);
+ final Arc newleft = new Arc(Arc.ARC_LEFT);
if (isBezierArcType()) {
arctesselator.bezier(newright, s, s, t1, t2);
arctesselator.bezier(newleft, s, s, t2, t1);
@@ -668,7 +668,7 @@ public class Subdivider {
* @param newright
* @param newleft
*/
- private void link(Arc jarc1, Arc jarc2, Arc newright, Arc newleft) {
+ private void link(final Arc jarc1, final Arc jarc2, final Arc newright, final Arc newleft) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.link");
}
@@ -688,7 +688,7 @@ public class Subdivider {
* @param jarc1
* @param jarc2
*/
- private void simplelink(Arc jarc1, Arc jarc2) {
+ private void simplelink(final Arc jarc1, final Arc jarc2) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.simplelink");
}
@@ -698,7 +698,7 @@ public class Subdivider {
* @param arc
* @param relative
*/
- private void check_s(Arc arc, Arc relative) {
+ private void check_s(final Arc arc, final Arc relative) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.check_s");
@@ -714,17 +714,17 @@ public class Subdivider {
* @param param
* @param value
*/
- private void partition(Bin bin, Bin left, Bin intersections, Bin right,
- Bin unknown, int param, float value) {
+ private void partition(final Bin bin, final Bin left, final Bin intersections, final Bin right,
+ final Bin unknown, final int param, final float value) {
- Bin headonleft = new Bin();
- Bin headonright = new Bin();
- Bin tailonleft = new Bin();
- Bin tailonright = new Bin();
+ final Bin headonleft = new Bin();
+ final Bin headonright = new Bin();
+ final Bin tailonleft = new Bin();
+ final Bin tailonright = new Bin();
for (Arc jarc = bin.removearc(); jarc != null; jarc = bin.removearc()) {
- float tdiff = jarc.tail()[param] - value;
- float hdiff = jarc.head()[param] - value;
+ final float tdiff = jarc.tail()[param] - value;
+ final float hdiff = jarc.head()[param] - value;
if (tdiff > 0) {
if (hdiff > 0) {
@@ -732,7 +732,7 @@ public class Subdivider {
} else if (hdiff == 0) {
tailonright.addarc(jarc);
} else {
- Arc jtemp;
+ final Arc jtemp;
switch (arc_split(jarc, param, value, 0)) {
case 2:
tailonright.addarc(jarc);
@@ -785,8 +785,8 @@ public class Subdivider {
* @param right
* @param value
*/
- private void classify_tailonright_t(Bin tailonright, Bin intersections,
- Bin right, float value) {
+ private void classify_tailonright_t(final Bin tailonright, final Bin intersections,
+ final Bin right, final float value) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.classify_tailonright_t");
@@ -799,14 +799,14 @@ public class Subdivider {
* @param out
* @param val
*/
- private void classify_tailonleft_s(Bin bin, Bin in, Bin out, float val) {
+ private void classify_tailonleft_s(final Bin bin, final Bin in, final Bin out, final float val) {
// DONE
Arc j;
while ((j = bin.removearc()) != null) {
j.clearitail();
- float diff = j.next.head()[0] - val;
+ final float diff = j.next.head()[0] - val;
if (diff > 0) {
in.addarc(j);
} else if (diff < 0) {
@@ -831,13 +831,13 @@ public class Subdivider {
* @param out
* @param val
*/
- private void classify_headonright_s(Bin bin, Bin in, Bin out, float val) {
+ private void classify_headonright_s(final Bin bin, final Bin in, final Bin out, final float val) {
// DONE
Arc j;
while ((j = bin.removearc()) != null) {
j.setitail();
- float diff = j.prev.tail()[0] - val;
+ final float diff = j.prev.tail()[0] - val;
if (diff > 0) {
if (ccwTurn_sr(j.prev, j))
out.addarc(j);
@@ -860,7 +860,7 @@ public class Subdivider {
* @param j
* @return false
*/
- private boolean ccwTurn_sr(Arc prev, Arc j) {
+ private boolean ccwTurn_sr(final Arc prev, final Arc j) {
// TODO Auto-generated method stub
// System.out.println("TODO ccwTurn_sr");
return false;
@@ -873,8 +873,8 @@ public class Subdivider {
* @param right
* @param value
*/
- private void classify_headonright_t(Bin headonright, Bin intersections,
- Bin right, float value) {
+ private void classify_headonright_t(final Bin headonright, final Bin intersections,
+ final Bin right, final float value) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.classify_headonright_t");
}
@@ -886,8 +886,8 @@ public class Subdivider {
* @param left
* @param value
*/
- private void classify_tailonleft_t(Bin tailonleft, Bin intersections,
- Bin left, float value) {
+ private void classify_tailonleft_t(final Bin tailonleft, final Bin intersections,
+ final Bin left, final float value) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.classify_tailonleft_t");
}
@@ -899,13 +899,13 @@ public class Subdivider {
* @param out
* @param val
*/
- private void classify_headonleft_t(Bin bin, Bin in, Bin out, float val) {
+ private void classify_headonleft_t(final Bin bin, final Bin in, final Bin out, final float val) {
// DONE
Arc j;
while ((j = bin.removearc()) != null) {
j.setitail();
- float diff = j.prev.tail()[1] - val;
+ final float diff = j.prev.tail()[1] - val;
if (diff > 0) {
out.addarc(j);
} else if (diff < 0) {
@@ -928,7 +928,7 @@ public class Subdivider {
* @param j
* @return false
*/
- private boolean ccwTurn_tl(Arc prev, Arc j) {
+ private boolean ccwTurn_tl(final Arc prev, final Arc j) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.ccwTurn_tl");
return false;
@@ -941,13 +941,13 @@ public class Subdivider {
* @param out
* @param val
*/
- private void classify_tailonright_s(Bin bin, Bin in, Bin out, float val) {
+ private void classify_tailonright_s(final Bin bin, final Bin in, final Bin out, final float val) {
// DONE
Arc j;
while ((j = bin.removearc()) != null) {
j.clearitail();
- float diff = j.next.head()[0] - val;
+ final float diff = j.next.head()[0] - val;
if (diff > 0) {
if (ccwTurn_sr(j, j.next))
out.addarc(j);
@@ -972,13 +972,13 @@ public class Subdivider {
* @param out
* @param val
*/
- private void classify_headonleft_s(Bin bin, Bin in, Bin out, float val) {
+ private void classify_headonleft_s(final Bin bin, final Bin in, final Bin out, final float val) {
// DONE
Arc j;
while ((j = bin.removearc()) != null) {
j.setitail();
- float diff = j.prev.tail()[0] - val;
+ final float diff = j.prev.tail()[0] - val;
if (diff > 0) {
out.addarc(j);
} else if (diff < 0) {
@@ -1002,7 +1002,7 @@ public class Subdivider {
* @param j
* @return false
*/
- private boolean ccwTurn_sl(Arc prev, Arc j) {
+ private boolean ccwTurn_sl(final Arc prev, final Arc j) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.ccwTurn_sl");
return false;
@@ -1016,7 +1016,7 @@ public class Subdivider {
* @param i
* @return 0
*/
- private int arc_split(Arc jarc, int param, float value, int i) {
+ private int arc_split(final Arc jarc, final int param, final float value, final int i) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.arc_split");
return 0;
@@ -1043,7 +1043,7 @@ public class Subdivider {
* Not used
* @param source
*/
- private void outline(Bin source) {
+ private void outline(final Bin source) {
// TODO Auto-generated method stub
// System.out.println("TODO subdivider.outline");
}
@@ -1053,13 +1053,13 @@ public class Subdivider {
* @param from range beginnings
* @param to range ends
*/
- private void makeBorderTrim(float[] from, float[] to) {
+ private void makeBorderTrim(final float[] from, final float[] to) {
// DONE
- float smin = from[0];
- float smax = to[0];
+ final float smin = from[0];
+ final float smax = to[0];
- float tmin = from[1];
- float tmax = to[1];
+ final float tmin = from[1];
+ final float tmax = to[1];
pjarc = null;
Arc jarc = null;
@@ -1092,10 +1092,10 @@ public class Subdivider {
*/
public void drawCurves() {
// DONE
- float[] from = new float[1];
- float[] to = new float[1];
+ final float[] from = new float[1];
+ final float[] to = new float[1];
- Flist bpts = new Flist();
+ final Flist bpts = new Flist();
qlist.getRange(from, to, bpts);
renderhints.init();
@@ -1103,13 +1103,13 @@ public class Subdivider {
backend.bgncurv();
for (int i = bpts.start; i < bpts.end - 1; i++) {
- float[] pta = new float[1];
- float[] ptb = new float[1];
+ final float[] pta = new float[1];
+ final float[] ptb = new float[1];
pta[0] = bpts.pts[i];
ptb[0] = bpts.pts[i + 1];
qlist.downloadAll(pta, ptb, backend);
- Curvelist curvelist = new Curvelist(qlist, pta, ptb);
+ final Curvelist curvelist = new Curvelist(qlist, pta, ptb);
samplingSplit(curvelist, renderhints.maxsubdivisions);
}
backend.endcurv();
@@ -1120,7 +1120,7 @@ public class Subdivider {
* @param curvelist list of curves
* @param maxsubdivisions maximum number of subdivisions
*/
- private void samplingSplit(Curvelist curvelist, int maxsubdivisions) {
+ private void samplingSplit(final Curvelist curvelist, final int maxsubdivisions) {
if (curvelist.cullCheck() == CULL_TRIVIAL_REJECT)
return;
@@ -1130,7 +1130,7 @@ public class Subdivider {
// TODO kód
// System.out.println("TODO subdivider-needsSamplingSubdivision");
} else {
- int nu = (int) (1 + curvelist.range[2] / curvelist.stepsize);
+ final int nu = (int) (1 + curvelist.range[2] / curvelist.stepsize);
backend.curvgrid(curvelist.range[0], curvelist.range[1], nu);
backend.curvmesh(0, nu);
}
@@ -1142,7 +1142,7 @@ public class Subdivider {
* @param d new domain_distance_u_rate value
*/
- public void set_domain_distance_u_rate(double d) {
+ public void set_domain_distance_u_rate(final double d) {
// DONE
domain_distance_u_rate = (float) d;
}
@@ -1151,7 +1151,7 @@ public class Subdivider {
* Sets new domain_distance_v_rate value
* @param d new domain_distance_v_rate value
*/
- public void set_domain_distance_v_rate(double d) {
+ public void set_domain_distance_v_rate(final double d) {
// DONE
domain_distance_v_rate = (float) d;
}
@@ -1160,7 +1160,7 @@ public class Subdivider {
* Sets new is_domain_distance_sampling value
* @param i new is_domain_distance_sampling value
*/
- public void set_is_domain_distance_sampling(int i) {
+ public void set_is_domain_distance_sampling(final int i) {
// DONE
this.is_domain_distance_sampling = i;
}