diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:21:36 +0200 |
commit | 556d92b63555a085b25e32b1cd55afce24edd07a (patch) | |
tree | 6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java | |
parent | a90f4a51dffec3247278e3c683ed4462b1dd9ab5 (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/Splinespec.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/glu/nurbs/Splinespec.java | 22 |
1 files changed, 11 insertions, 11 deletions
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); |