diff options
author | Sven Gothel <[email protected]> | 2011-04-08 21:35:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-08 21:35:34 +0200 |
commit | 324b85b0cc688f85a91e84b0b6d6a0378a79bea3 (patch) | |
tree | a5acbe1630d879e80ec66c6c3a72623431c57632 /src/jogl/classes/jogamp/opengl | |
parent | e104e42ba9ecda8c4094bf4b183105a6ab719da5 (diff) |
Fix TAB: Replace all TAB with 4 spaces
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
36 files changed, 273 insertions, 273 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java index 5eb73cd2e..3f8a76535 100644 --- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java +++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java @@ -223,7 +223,7 @@ public class GLUquadricImpl implements GLUquadric { * GLU.LINE: Quadrics are rendered as a set of lines. * * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges - * separating coplanar faces will not be drawn. + * separating coplanar faces will not be drawn. * * GLU.POINT: Quadrics are rendered as a set of points. * @@ -234,8 +234,8 @@ public class GLUquadricImpl implements GLUquadric { } /** - * specifies what kind of normals are desired for quadrics. - * The legal values are as follows: + * specifies what kind of normals are desired for quadrics. + * The legal values are as follows: * * GLU.NONE: No normals are generated. * @@ -252,7 +252,7 @@ public class GLUquadricImpl implements GLUquadric { /** * specifies what kind of orientation is desired for. - * The orientation values are as follows: + * The orientation values are as follows: * * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. * @@ -495,10 +495,10 @@ public class GLUquadricImpl implements GLUquadric { glNormal3f(gl, 0.0f, 0.0f, -1.0f); } } - + da = 2.0f * PI / slices; dr = (outerRadius - innerRadius) / loops; - + switch (drawStyle) { case GLU.GLU_FILL: { @@ -916,7 +916,7 @@ public class GLUquadricImpl implements GLUquadric { } /** - * draws a sphere of the given radius centered around the origin. + * draws a sphere of the given radius centered around the origin. * The sphere is subdivided around the z axis into slices and along the z axis * into stacks (similar to lines of longitude and latitude). * @@ -1188,7 +1188,7 @@ public class GLUquadricImpl implements GLUquadric { */ private void normal3f(GL gl, float x, float y, float z) { float mag; - + mag = (float)Math.sqrt(x * x + y * y + z * z); if (mag > 0.00001F) { x /= mag; diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java index 043edac89..2ef4468e5 100644 --- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java +++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java @@ -131,7 +131,7 @@ class GL2CurveEvaluator implements CurveEvaluator { CArrayOfFloats ps) { if (output_triangles) { // TODO code for callback (output_triangles probably indicates callback) - // System.out.println("TODO curveevaluator.map1f-output_triangles"); + // System.out.println("TODO curveevaluator.map1f-output_triangles"); } else { gl.glMap1f(type, ulo, uhi, stride, order, ps.getArray(), ps .getPointer()); @@ -166,10 +166,10 @@ class GL2CurveEvaluator implements CurveEvaluator { */ public void mapgrid1f(int nu, float u1, float u2) { if (output_triangles) { - // System.out.println("TODO curveevaluator.mapgrid1f"); + // System.out.println("TODO curveevaluator.mapgrid1f"); } else gl.glMapGrid1f(nu, u1, u2); - // // System.out.println("upravit NU"); + // // System.out.println("upravit NU"); // gl.glMapGrid1f(50,u1,u2); } @@ -189,7 +189,7 @@ class GL2CurveEvaluator implements CurveEvaluator { */ if (output_triangles) { // TODO code for callback - // System.out.println("TODO openglcurveevaluator.mapmesh1f output_triangles"); + // System.out.println("TODO openglcurveevaluator.mapmesh1f output_triangles"); } else { switch (style) { case Backend.N_MESHFILL: diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java index bc63994cb..155c4f9a9 100644 --- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java +++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java @@ -76,10 +76,10 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { if (output_triangles) { // TODO outp triangles surfaceevaluator bgnmap2f - // System.out.println("TODO surfaceevaluator.bgnmap2f output triangles"); + // System.out.println("TODO surfaceevaluator.bgnmap2f output triangles"); } else { gl.glPushAttrib(GL2.GL_EVAL_BIT); - // System.out.println("TODO surfaceevaluator.bgnmap2f glgetintegerv"); + // System.out.println("TODO surfaceevaluator.bgnmap2f glgetintegerv"); } } @@ -112,7 +112,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { public void endmap2f() { // TODO Auto-generated method stub if (output_triangles) { - // System.out.println("TODO surfaceevaluator.endmap2f output triangles"); + // System.out.println("TODO surfaceevaluator.endmap2f output triangles"); } else { gl.glPopAttrib(); // TODO use LOD @@ -142,7 +142,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) { if (output_triangles) { - // System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles"); + // System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles"); } else { gl.glMapGrid2d(nu, u0, u1, nv, v0, v1); } @@ -159,7 +159,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { */ public void mapmesh2f(int style, int umin, int umax, int vmin, int vmax) { if (output_triangles) { - // System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles"); + // System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles"); } else { /* //DEBUG - draw control points this.poradi++; @@ -199,7 +199,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { float vlo, float vhi, int vstride, int vorder, CArrayOfFloats pts) { // TODO Auto-generated method stub if (output_triangles) { - // System.out.println("TODO openglsurfaceevaluator.map2f output_triangles"); + // System.out.println("TODO openglsurfaceevaluator.map2f output_triangles"); } else { gl.glMap2f(type, ulo, uhi, ustride, uorder, vlo, vhi, vstride, vorder, pts.getArray(), pts.getPointer()); diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java index bd0eaf771..58b565484 100644 --- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java +++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java @@ -442,7 +442,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { // TODO errval ?? if (numTrims > 0) { - // System.out.println("TODO glunurbs.do_endsurface - numtrims > 0"); + // System.out.println("TODO glunurbs.do_endsurface - numtrims > 0"); } subdivider.beginQuilts(new GL2Backend()); @@ -461,7 +461,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { */ public void do_endcurve() { // DONE - // // System.out.println("do_endcurve"); + // // System.out.println("do_endcurve"); if (inCurve <= 0) { do_nurbserror(7); return; @@ -509,7 +509,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { */ private void do_nurbserror(int i) { // TODO nurberror - // System.out.println("TODO nurbserror " + i); + // System.out.println("TODO nurbserror " + i); } /** @@ -527,7 +527,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { */ private void loadGLMatrices() { // TODO Auto-generated method stub - // System.out.println("TODO glunurbs.loadGLMatrices"); + // System.out.println("TODO glunurbs.loadGLMatrices"); } /** @@ -783,7 +783,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { // DONE O_surface o_surface = new O_surface(); // TODO nuid - // System.out.println("TODO glunurbs.bgnsurface nuid"); + // System.out.println("TODO glunurbs.bgnsurface nuid"); thread("do_bgnsurface", o_surface); } @@ -800,7 +800,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs { */ private void endtrim() { // TODO Auto-generated method stub - // System.out.println("TODO glunurbs.endtrim"); + // System.out.println("TODO glunurbs.endtrim"); } /** diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java index 0d04d4cd6..f4ad70193 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java @@ -47,7 +47,7 @@ public class ArcSdirSorter { */ public ArcSdirSorter(Subdivider subdivider) { //TODO - // System.out.println("TODO arcsdirsorter.constructor"); + // System.out.println("TODO arcsdirsorter.constructor"); } /** @@ -57,7 +57,7 @@ public class ArcSdirSorter { */ public void qsort(CArrayOfArcs list, int count) { // TODO - // System.out.println("TODO arcsdirsorter.qsort"); + // 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 bee98b8c3..be72c53d2 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java @@ -46,7 +46,7 @@ public class ArcTdirSorter { */ public ArcTdirSorter(Subdivider subdivider) { // TODO Auto-generated constructor stub - // System.out.println("TODO arcTsorter.konstruktor"); + // System.out.println("TODO arcTsorter.konstruktor"); } /** * Sorts list of arcs @@ -55,6 +55,6 @@ public class ArcTdirSorter { */ public void qsort(CArrayOfArcs list, int count) { // TODO Auto-generated method stub - // System.out.println("TODO arcTsorter.qsort"); + // 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 2e4d3eb96..bd6311414 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java @@ -72,7 +72,7 @@ public class ArcTesselator { */ public void pwl_right(Arc newright, float s, float t1, float t2, float f) { // TODO Auto-generated method stub - // System.out.println("TODO arctesselator.pwl_right"); + // System.out.println("TODO arctesselator.pwl_right"); } /** @@ -85,6 +85,6 @@ public class ArcTesselator { */ public void pwl_left(Arc newright, float s, float t2, float t1, float f) { // TODO Auto-generated method stub - // System.out.println("TODO arctesselator.pwl_left"); + // 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 4959f8000..610a19556 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java @@ -188,7 +188,7 @@ public abstract class Backend { * @param m step in v direction */ public void surfmesh(int u, int v, int n, int m) { - // System.out.println("TODO backend.surfmesh wireframequads"); + // System.out.println("TODO backend.surfmesh wireframequads"); // TODO wireframequads surfaceEvaluator.mapmesh2f(NurbsConsts.N_MESHFILL, u, u + n, v, v + m); } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java index b0ff4e6e5..786781723 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java @@ -135,7 +135,7 @@ public class Curve { stride); } if (cullval == Subdivider.CULL_ACCEPT) { - // System.out.println("TODO curve.Curve-cullval"); + // System.out.println("TODO curve.Curve-cullval"); // mapdesc.xformCulling(ps,qs.get().order,qs.get().stride,cpts,stride); } @@ -145,13 +145,13 @@ public class Curve { range[2] = range[1] - range[0]; // TODO it is necessary to solve problem with "this" pointer here if (range[0] != pta[0]) { - // System.out.println("TODO curve.Curve-range0"); + // System.out.println("TODO curve.Curve-range0"); // Curve lower=new Curve(this,pta,0); // lower.next=next; // this=lower; } if (range[1] != ptb[0]) { - // System.out.println("TODO curve.Curve-range1"); + // System.out.println("TODO curve.Curve-range1"); // Curve lower=new Curve(this,ptb,0); } } @@ -162,7 +162,7 @@ public class Curve { */ public int cullCheck() { if (cullval == Subdivider.CULL_ACCEPT) { - // System.out.println("TODO curve.cullval"); + // System.out.println("TODO curve.cullval"); // cullval=mapdesc.cullCheck(cpts,order,stride); } // TODO compute cullval and return the computed value @@ -189,16 +189,16 @@ public class Curve { int val = 0; // mapdesc.project(spts,stride,tmp,tstride,order); - // System.out.println("TODO curve.getsptepsize mapdesc.project"); + // System.out.println("TODO curve.getsptepsize mapdesc.project"); if (val == 0) { setstepsize(mapdesc.maxrate); } else { float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE); if (mapdesc.isParametricDistanceSampling()) { - // System.out.println("TODO curve.getstepsize - parametric"); + // System.out.println("TODO curve.getstepsize - parametric"); } else if (mapdesc.isPathLengthSampling()) { - // System.out.println("TODO curve.getstepsize - pathlength"); + // System.out.println("TODO curve.getstepsize - pathlength"); } else { setstepsize(mapdesc.maxrate); } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java index 5c80ffd30..d9d012606 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java @@ -51,6 +51,6 @@ public class DisplayList { */ public void append(Object src, Method m, Object arg) { // TODO Auto-generated method stub - // System.out.println("TODO displaylist append"); + // System.out.println("TODO displaylist append"); } } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java index 4f97b1271..114832a1c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java @@ -366,7 +366,7 @@ public class Knotspec { break; default: // TODO break with copying in general case - // System.out.println("TODO knotspec.pt_io_copy"); + // System.out.println("TODO knotspec.pt_io_copy"); break; } @@ -388,7 +388,7 @@ public class Knotspec { if (istransformed) { p.raisePointerBy(postoffset); for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), - p.getPointer() + postwidth); p.getPointer() != pend + p.getPointer() + postwidth); p.getPointer() != pend .getPointer(); p.raisePointerBy(poststride)) next.transform(p); @@ -409,7 +409,7 @@ public class Knotspec { if (istransformed) { p.raisePointerBy(postoffset); for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(), - p.getPointer() + postwidth); p.getPointer() != pend + p.getPointer() + postwidth); p.getPointer() != pend .getPointer(); p.raisePointerBy(poststride)) { kspectotrans.insert(p); } @@ -549,8 +549,8 @@ public class Knotspec { * z.getRelative(0))); break; default: - //no need of default - see previous method and its case statement - // System.out.println("TODO pt_oo_sum default"); + //no need of default - see previous method and its case statement + // System.out.println("TODO pt_oo_sum default"); break; } } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java index 89389dea6..aac4dfc52 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java @@ -160,7 +160,7 @@ public class Knotvector { */ public void show(String msg) { // TODO Auto-generated method stub - // System.out.println("TODO knotvector.show"); + // System.out.println("TODO knotvector.show"); } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java index 8fab114ff..bd5d2db98 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java @@ -349,7 +349,7 @@ public class Mapdesc { */ public float getProperty(int tag) { // TODO Auto-generated method stub - // System.out.println("TODO mapdesc.getproperty"); + // System.out.println("TODO mapdesc.getproperty"); return 0; } @@ -428,10 +428,10 @@ public class Mapdesc { * @param outstride output number of control points' coordinates */ private void xFormMat(float[][] mat, CArrayOfFloats pts, int order, - int stride, float[] cp, int outstride) { + int stride, float[] cp, int outstride) { // TODO Auto-generated method stub - // System.out.println("TODO mapdsc.xformmat ; change cp from float[] to carrayoffloats"); + // System.out.println("TODO mapdsc.xformmat ; change cp from float[] to carrayoffloats"); if (isrational > 0) { diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java index 51c43fca7..a44f2451c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java @@ -49,6 +49,6 @@ public class Patch { * @param patch */ public Patch(Quilt q, float[] pta, float[] ptb, Patch patch) { - // System.out.println("TODO patch.constructor"); + // 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 f60a0cc43..f1e499a28 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java @@ -82,7 +82,7 @@ public class Patchlist { */ public Patchlist(Patchlist patchlist, int param, float mid) { // TODO Auto-generated constructor stub - // System.out.println("TODO patchlist.konstruktor 2"); + // System.out.println("TODO patchlist.konstruktor 2"); } /** @@ -91,7 +91,7 @@ public class Patchlist { */ public int cullCheck() { // TODO Auto-generated method stub - // System.out.println("TODO patchlist.cullcheck"); + // System.out.println("TODO patchlist.cullcheck"); return 0; } @@ -99,7 +99,7 @@ public class Patchlist { * Empty method */ public void getstepsize() { - // System.out.println("TODO patchlist.getsptepsize"); + // System.out.println("TODO patchlist.getsptepsize"); // TODO Auto-generated method stub } @@ -110,7 +110,7 @@ public class Patchlist { */ public boolean needsSamplingSubdivision() { // TODO Auto-generated method stub - // System.out.println("patchlist.needsSamplingSubdivision"); + // System.out.println("patchlist.needsSamplingSubdivision"); return false; } @@ -121,7 +121,7 @@ public class Patchlist { */ public boolean needsSubdivision(int i) { // TODO Auto-generated method stub - // System.out.println("TODO patchlist.needsSubdivision"); + // System.out.println("TODO patchlist.needsSubdivision"); return false; } @@ -131,7 +131,7 @@ public class Patchlist { */ public boolean needsNonSamplingSubdivision() { // TODO Auto-generated method stub - // System.out.println("TODO patchlist.needsNonSamplingSubdivision"); + // System.out.println("TODO patchlist.needsNonSamplingSubdivision"); return false; } @@ -140,6 +140,6 @@ public class Patchlist { */ public void bbox() { // TODO Auto-generated method stub - // System.out.println("TODO patchlist.bbox"); + // System.out.println("TODO patchlist.bbox"); } } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java index 6d732a44f..6bea4928c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java @@ -248,7 +248,7 @@ public class Quilt { */ public int isCulled() { if (mapdesc.isCulling()) { - // System.out.println("TODO quilt.isculled mapdesc.isculling"); + // System.out.println("TODO quilt.isculled mapdesc.isculling"); return 0; } else { return Subdivider.CULL_ACCEPT; @@ -277,6 +277,6 @@ public class Quilt { */ public void findRates(Flist sbrkpts, Flist tbrkpts, float[] rate) { // TODO Auto-generated method stub - // System.out.println("TODO quilt.findrates"); + // System.out.println("TODO quilt.findrates"); } } diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt b/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt index 89630c71e..7f80e568c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt @@ -1,59 +1,59 @@ Unimplemented functionality - - tesselation and callbacks - - trimming - - setting NURBS properties (-> sampling etc.) + - tesselation and callbacks + - trimming + - setting NURBS properties (-> sampling etc.) Differences from C++ source - - no pooling - - pointers to arrays are replaced by CArrayOf... classes and their methods + - no pooling + - pointers to arrays are replaced by CArrayOf... classes and their methods Unimplemented or incomplete "calltree top" methods (according to glu.def in Mesa 6.5) - gluBeginTrim - gluDeleteNurbsRenderer - won't be needed - gluEndTrim - gluGetNurbsProperty - gluLoadSamplingMatrices - gluNurbsCallback - gluNurbsCallbackData - gluNurbsCallbackDataEXT - gluNurbsCurve - TODO type switch - gluNurbsProperty - gluPwlCurve - gluQuadricCallback - not a NURBS method + gluBeginTrim + gluDeleteNurbsRenderer - won't be needed + gluEndTrim + gluGetNurbsProperty + gluLoadSamplingMatrices + gluNurbsCallback + gluNurbsCallbackData + gluNurbsCallbackDataEXT + gluNurbsCurve - TODO type switch + gluNurbsProperty + gluPwlCurve + gluQuadricCallback - not a NURBS method As of files - - Arc[ST]dirSorter.java - unimplemented (part of tesselation) - - Backend.java:194 - wireframe quads - part of tesselation/callback - - Curve.java:141-204 - culling - - DisplayList.java:57 - append to DL - not sure whether it will be needed - - GLUnurbs.java :443,484 - error values - :445 - trimming - :512 - error handling (callback) - :530 - loadGLmatrices - :786 - nuid - nurbs object id - won't be needed I think - :803 - end trim - - GLUwNURBS.java:68,176 - NUBRS properties - - Knotspec.java :371 - copying in general case (more than 4 coords) - :517 - copying with more than 4 coords - :556 - pt_oo_sum default - - Knotvector.java:165 - show method (probably debugging) - - Mapdesc.java :354 - get property - :435 - xFormMat - change param cp to CArrayOfFloats; probably sampling functionality - - Maplist.java:68 - clear ? - - OpenGLCurveEvaluator.java :132 - tess./callback code - :168 - mapgrid1f - :190 - tess./callback code (output triangles) - - OpenGLSurfaceEvaluator.java :77 . tess./callback code - :81 - glGetIntegerValue - :114 - tess./callback code - :117 - Level of detail - :144,161,201 - tess./callback code - output triangles - - Patch.java:55 - constructor stuff ? - - Patchlist.java:55 - constructor stuff ? - :97 - cull check - :105 - step size - :115 - need of sampling subdivision - :126 - need of subdivision - :137 - need of non sampling subd. - :146 - bbox (??) - -Quilt.java :254 - culling - :282 - rates - -Subdivider.java - all TODOs - it's stuff about trimming probably - :545 - jumpbuffer - not sure purpose it exactly served in original source + - Arc[ST]dirSorter.java - unimplemented (part of tesselation) + - Backend.java:194 - wireframe quads - part of tesselation/callback + - Curve.java:141-204 - culling + - DisplayList.java:57 - append to DL - not sure whether it will be needed + - GLUnurbs.java :443,484 - error values + :445 - trimming + :512 - error handling (callback) + :530 - loadGLmatrices + :786 - nuid - nurbs object id - won't be needed I think + :803 - end trim + - GLUwNURBS.java:68,176 - NUBRS properties + - Knotspec.java :371 - copying in general case (more than 4 coords) + :517 - copying with more than 4 coords + :556 - pt_oo_sum default + - Knotvector.java:165 - show method (probably debugging) + - Mapdesc.java :354 - get property + :435 - xFormMat - change param cp to CArrayOfFloats; probably sampling functionality + - Maplist.java:68 - clear ? + - OpenGLCurveEvaluator.java :132 - tess./callback code + :168 - mapgrid1f + :190 - tess./callback code (output triangles) + - OpenGLSurfaceEvaluator.java :77 . tess./callback code + :81 - glGetIntegerValue + :114 - tess./callback code + :117 - Level of detail + :144,161,201 - tess./callback code - output triangles + - Patch.java:55 - constructor stuff ? + - Patchlist.java:55 - constructor stuff ? + :97 - cull check + :105 - step size + :115 - need of sampling subdivision + :126 - need of subdivision + :137 - need of non sampling subd. + :146 - bbox (??) + -Quilt.java :254 - culling + :282 - rates + -Subdivider.java - all TODOs - it's stuff about trimming probably + :545 - jumpbuffer - not sure purpose it exactly served in original source diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java index 3378dba8d..37774f811 100644 --- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java +++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java @@ -187,7 +187,7 @@ public class Subdivider { renderhints.init(); if (qlist == null) { - // System.out.println("qlist is null"); + // System.out.println("qlist is null"); return; } @@ -217,7 +217,7 @@ public class Subdivider { } else { float[] rate = new float[2]; qlist.findRates(spbrkpts, tpbrkpts, rate); - // System.out.println("subdivider.drawsurfaces decompose"); + // System.out.println("subdivider.drawsurfaces decompose"); } backend.bgnsurf(renderhints.wiretris, renderhints.wirequads); @@ -268,7 +268,7 @@ public class Subdivider { */ private void freejarcs(Bin initialbin2) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.freejarcs"); + // System.out.println("TODO subdivider.freejarcs"); } /** @@ -319,7 +319,7 @@ public class Subdivider { } } } else{ - // System.out.println("Source is empty - subdivider.splitins"); + // System.out.println("Source is empty - subdivider.splitins"); } } @@ -331,7 +331,7 @@ public class Subdivider { */ private void splitInT(Bin source, int start, int end) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.splitint"); + // System.out.println("TODO subdivider.splitint"); if (source.isnonempty()) { if (start != end) { @@ -485,7 +485,7 @@ public class Subdivider { */ private void monosplitInS(Bin source, int start, int end) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.monosplitins"); + // System.out.println("TODO subdivider.monosplitins"); } /** @@ -494,7 +494,7 @@ public class Subdivider { */ private void findIrregularS(Bin source) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.findIrregularS"); + // System.out.println("TODO subdivider.findIrregularS"); } /** @@ -502,7 +502,7 @@ public class Subdivider { */ private void setArcTypePwl() { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.setarctypepwl"); + // System.out.println("TODO subdivider.setarctypepwl"); } /** @@ -512,7 +512,7 @@ public class Subdivider { */ private void tesselation(Bin source, Patchlist patchlist) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.tesselation"); + // System.out.println("TODO subdivider.tesselation"); } /** @@ -520,7 +520,7 @@ public class Subdivider { */ private void setDegenerate() { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.setdegenerate"); + // System.out.println("TODO subdivider.setdegenerate"); } /** @@ -611,7 +611,7 @@ public class Subdivider { */ private void join_t(Bin left, Bin right, Arc arc, Arc relative) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.join_t"); + // System.out.println("TODO subdivider.join_t"); } /** @@ -621,7 +621,7 @@ public class Subdivider { */ private void check_t(Arc arc, Arc relative) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.check_t"); + // System.out.println("TODO subdivider.check_t"); } /** @@ -670,7 +670,7 @@ public class Subdivider { */ private void link(Arc jarc1, Arc jarc2, Arc newright, Arc newleft) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.link"); + // System.out.println("TODO subdivider.link"); } /** @@ -679,7 +679,7 @@ public class Subdivider { */ private boolean isBezierArcType() { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.isbezierarc"); + // System.out.println("TODO subdivider.isbezierarc"); return true; } @@ -690,7 +690,7 @@ public class Subdivider { */ private void simplelink(Arc jarc1, Arc jarc2) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.simplelink"); + // System.out.println("TODO subdivider.simplelink"); } /** @@ -700,7 +700,7 @@ public class Subdivider { */ private void check_s(Arc arc, Arc relative) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.check_s"); + // System.out.println("TODO subdivider.check_s"); } @@ -756,7 +756,7 @@ public class Subdivider { } else { if (hdiff > 0) { // TODO rest - // System.out.println("TODO subdivider.partition rest of else"); + // System.out.println("TODO subdivider.partition rest of else"); } else if (hdiff == 0) { tailonleft.addarc(jarc); } else { @@ -788,7 +788,7 @@ public class Subdivider { private void classify_tailonright_t(Bin tailonright, Bin intersections, Bin right, float value) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.classify_tailonright_t"); + // System.out.println("TODO subdivider.classify_tailonright_t"); } @@ -862,7 +862,7 @@ public class Subdivider { */ private boolean ccwTurn_sr(Arc prev, Arc j) { // TODO Auto-generated method stub - // System.out.println("TODO ccwTurn_sr"); + // System.out.println("TODO ccwTurn_sr"); return false; } @@ -876,7 +876,7 @@ public class Subdivider { private void classify_headonright_t(Bin headonright, Bin intersections, Bin right, float value) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.classify_headonright_t"); + // System.out.println("TODO subdivider.classify_headonright_t"); } /** @@ -889,7 +889,7 @@ public class Subdivider { private void classify_tailonleft_t(Bin tailonleft, Bin intersections, Bin left, float value) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.classify_tailonleft_t"); + // System.out.println("TODO subdivider.classify_tailonleft_t"); } /** @@ -930,7 +930,7 @@ public class Subdivider { */ private boolean ccwTurn_tl(Arc prev, Arc j) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.ccwTurn_tl"); + // System.out.println("TODO subdivider.ccwTurn_tl"); return false; } @@ -1004,7 +1004,7 @@ public class Subdivider { */ private boolean ccwTurn_sl(Arc prev, Arc j) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.ccwTurn_sl"); + // System.out.println("TODO subdivider.ccwTurn_sl"); return false; } @@ -1018,7 +1018,7 @@ public class Subdivider { */ private int arc_split(Arc jarc, int param, float value, int i) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.arc_split"); + // System.out.println("TODO subdivider.arc_split"); return 0; } @@ -1045,7 +1045,7 @@ public class Subdivider { */ private void outline(Bin source) { // TODO Auto-generated method stub - // System.out.println("TODO subdivider.outline"); + // System.out.println("TODO subdivider.outline"); } /** @@ -1128,7 +1128,7 @@ public class Subdivider { if (curvelist.needsSamplingSubdivision() && (subdivisions > 0)) { // TODO kód - // System.out.println("TODO subdivider-needsSamplingSubdivision"); + // System.out.println("TODO subdivider-needsSamplingSubdivision"); } else { int nu = (int) (1 + curvelist.range[2] / curvelist.stepsize); backend.curvgrid(curvelist.range[0], curvelist.range[1], nu); diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java index 13c226a7c..17f58309a 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java @@ -54,16 +54,16 @@ package jogamp.opengl.glu.tessellator; class ActiveRegion { - GLUhalfEdge eUp; /* upper edge, directed right to left */ - DictNode nodeUp; /* dictionary node corresponding to eUp */ - int windingNumber; /* used to determine which regions are + GLUhalfEdge eUp; /* upper edge, directed right to left */ + DictNode nodeUp; /* dictionary node corresponding to eUp */ + int windingNumber; /* used to determine which regions are * inside the polygon */ - boolean inside; /* is this region inside the polygon? */ - boolean sentinel; /* marks fake edges at t = +/-infinity */ - boolean dirty; /* marks regions where the upper or lower + boolean inside; /* is this region inside the polygon? */ + boolean sentinel; /* marks fake edges at t = +/-infinity */ + boolean dirty; /* marks regions where the upper or lower * edge has changed, but we haven't checked * whether they intersect yet */ - boolean fixUpperEdge; /* marks temporary edges introduced when + boolean fixUpperEdge; /* marks temporary edges introduced when * we process a "right vertex" (one without * any edges leaving to the right) */ } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java index b15bf7195..892722d9f 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java @@ -53,13 +53,13 @@ package jogamp.opengl.glu.tessellator; class GLUface { - public GLUface next; /* next face (never NULL) */ - public GLUface prev; /* previous face (never NULL) */ - public GLUhalfEdge anEdge; /* a half edge with this left face */ - public Object data; /* room for client's data */ + public GLUface next; /* next face (never NULL) */ + public GLUface prev; /* previous face (never NULL) */ + public GLUhalfEdge anEdge; /* a half edge with this left face */ + public Object data; /* room for client's data */ /* Internal data (keep hidden) */ - public GLUface trail; /* "stack" for conversion to strips */ - public boolean marked; /* flag for conversion to strips */ - public boolean inside; /* this face is in the polygon interior */ + public GLUface trail; /* "stack" for conversion to strips */ + public boolean marked; /* flag for conversion to strips */ + public boolean inside; /* this face is in the polygon interior */ } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java index 385a4384b..29944f9b2 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java @@ -53,16 +53,16 @@ package jogamp.opengl.glu.tessellator; class GLUhalfEdge { - public GLUhalfEdge next; /* doubly-linked list (prev==Sym->next) */ - public GLUhalfEdge Sym; /* same edge, opposite direction */ - public GLUhalfEdge Onext; /* next edge CCW around origin */ - public GLUhalfEdge Lnext; /* next edge CCW around left face */ - public GLUvertex Org; /* origin vertex (Overtex too long) */ - public jogamp.opengl.glu.tessellator.GLUface Lface; /* left face */ + public GLUhalfEdge next; /* doubly-linked list (prev==Sym->next) */ + public GLUhalfEdge Sym; /* same edge, opposite direction */ + public GLUhalfEdge Onext; /* next edge CCW around origin */ + public GLUhalfEdge Lnext; /* next edge CCW around left face */ + public GLUvertex Org; /* origin vertex (Overtex too long) */ + public jogamp.opengl.glu.tessellator.GLUface Lface; /* left face */ /* Internal data (keep hidden) */ - public jogamp.opengl.glu.tessellator.ActiveRegion activeRegion; /* a region with this upper edge (sweep.c) */ - public int winding; /* change in winding number when crossing */ + public jogamp.opengl.glu.tessellator.ActiveRegion activeRegion; /* a region with this upper edge (sweep.c) */ + public int winding; /* change in winding number when crossing */ public boolean first; public GLUhalfEdge(boolean first) { diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java index dfdf5be70..10af74319 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java @@ -53,8 +53,8 @@ package jogamp.opengl.glu.tessellator; class GLUmesh { - GLUvertex vHead = new GLUvertex(); /* dummy header for vertex list */ - jogamp.opengl.glu.tessellator.GLUface fHead = new GLUface(); /* dummy header for face list */ - jogamp.opengl.glu.tessellator.GLUhalfEdge eHead = new GLUhalfEdge(true); /* dummy header for edge list */ - jogamp.opengl.glu.tessellator.GLUhalfEdge eHeadSym = new GLUhalfEdge(false); /* and its symmetric counterpart */ + GLUvertex vHead = new GLUvertex(); /* dummy header for vertex list */ + jogamp.opengl.glu.tessellator.GLUface fHead = new GLUface(); /* dummy header for face list */ + jogamp.opengl.glu.tessellator.GLUhalfEdge eHead = new GLUhalfEdge(true); /* dummy header for edge list */ + jogamp.opengl.glu.tessellator.GLUhalfEdge eHeadSym = new GLUhalfEdge(false); /* and its symmetric counterpart */ } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java index 182820bbc..d594cb3eb 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java @@ -59,32 +59,32 @@ import javax.media.opengl.glu.*; public class GLUtessellatorImpl implements GLUtessellator { public static final int TESS_MAX_CACHE = 100; - private int state; /* what begin/end calls have we seen? */ + private int state; /* what begin/end calls have we seen? */ - private GLUhalfEdge lastEdge; /* lastEdge->Org is the most recent vertex */ - GLUmesh mesh; /* stores the input contours, and eventually + private GLUhalfEdge lastEdge; /* lastEdge->Org is the most recent vertex */ + GLUmesh mesh; /* stores the input contours, and eventually the tessellation itself */ /*** state needed for projecting onto the sweep plane ***/ - double[] normal = new double[3]; /* user-specified normal (if provided) */ - double[] sUnit = new double[3]; /* unit vector in s-direction (debugging) */ - double[] tUnit = new double[3]; /* unit vector in t-direction (debugging) */ + double[] normal = new double[3]; /* user-specified normal (if provided) */ + double[] sUnit = new double[3]; /* unit vector in s-direction (debugging) */ + double[] tUnit = new double[3]; /* unit vector in t-direction (debugging) */ /*** state needed for the line sweep ***/ - private double relTolerance; /* tolerance for merging features */ - int windingRule; /* rule for determining polygon interior */ - boolean fatalError; /* fatal error: needed combine callback */ + private double relTolerance; /* tolerance for merging features */ + int windingRule; /* rule for determining polygon interior */ + boolean fatalError; /* fatal error: needed combine callback */ - Dict dict; /* edge dictionary for sweep line */ - PriorityQ pq; /* priority queue of vertex events */ - GLUvertex event; /* current sweep event being processed */ + Dict dict; /* edge dictionary for sweep line */ + PriorityQ pq; /* priority queue of vertex events */ + GLUvertex event; /* current sweep event being processed */ /*** state needed for rendering callbacks (see render.c) ***/ - boolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ - boolean boundaryOnly; /* Extract contours, not triangles */ + boolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ + boolean boundaryOnly; /* Extract contours, not triangles */ boolean avoidDegenerateTris; /* JOGL-specific hint to try to improve triangulation by avoiding producing degenerate (zero-area) triangles; has not been tested exhaustively and is therefore an option */ @@ -96,12 +96,12 @@ public class GLUtessellatorImpl implements GLUtessellator { /*** state needed to cache single-contour polygons for renderCache() */ - private boolean flushCacheOnNextVertex; /* empty cache on next vertex() call */ - int cacheCount; /* number of cached vertices */ - CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex data */ + private boolean flushCacheOnNextVertex; /* empty cache on next vertex() call */ + int cacheCount; /* number of cached vertices */ + CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex data */ /*** rendering callbacks that also pass polygon data ***/ - private Object polygonData; /* client data for current polygon */ + private Object polygonData; /* client data for current polygon */ private GLUtessellatorCallback callBegin; private GLUtessellatorCallback callEdgeFlag; @@ -120,10 +120,10 @@ public class GLUtessellatorImpl implements GLUtessellator { private GLUtessellatorCallback callCombineData; private static final double GLU_TESS_DEFAULT_TOLERANCE = 0.0; -// private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ +// private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ private static GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter(); -// #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ +// #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ // MAX(sizeof(GLUvertex),sizeof(GLUface)))) private GLUtessellatorImpl() { @@ -220,7 +220,7 @@ public class GLUtessellatorImpl implements GLUtessellator { case GLU.GLU_TESS_WINDING_RULE: int windingRule = (int) value; - if (windingRule != value) break; /* not an integer */ + if (windingRule != value) break; /* not an integer */ switch (windingRule) { case GLU.GLU_TESS_WINDING_ODD: @@ -523,7 +523,7 @@ public class GLUtessellatorImpl implements GLUtessellator { * Each interior region is guaranteed be monotone. */ if (!Sweep.__gl_computeInterior(this)) { - throw new RuntimeException(); /* could've used a label */ + throw new RuntimeException(); /* could've used a label */ } mesh = this.mesh; @@ -539,7 +539,7 @@ public class GLUtessellatorImpl implements GLUtessellator { } else { rc = TessMono.__gl_meshTessellateInterior(mesh, avoidDegenerateTris); } - if (!rc) throw new RuntimeException(); /* could've used a label */ + if (!rc) throw new RuntimeException(); /* could've used a label */ Mesh.__gl_meshCheckMesh(mesh); @@ -552,7 +552,7 @@ public class GLUtessellatorImpl implements GLUtessellator { if (boundaryOnly) { Render.__gl_renderBoundary(this, mesh); /* output boundary contours */ } else { - Render.__gl_renderMesh(this, mesh); /* output strips and fans */ + Render.__gl_renderMesh(this, mesh); /* output strips and fans */ } } // if (callMesh != NULL_CB) { @@ -564,7 +564,7 @@ public class GLUtessellatorImpl implements GLUtessellator { // * faces in the first place. // */ // TessMono.__gl_meshDiscardExterior(mesh); -// callMesh.mesh(mesh); /* user wants the mesh itself */ +// callMesh.mesh(mesh); /* user wants the mesh itself */ // mesh = null; // polygonData = null; // return; diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java index c30d75946..ecc91c2b6 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java @@ -53,13 +53,13 @@ package jogamp.opengl.glu.tessellator; class GLUvertex { - public GLUvertex next; /* next vertex (never NULL) */ - public GLUvertex prev; /* previous vertex (never NULL) */ - public jogamp.opengl.glu.tessellator.GLUhalfEdge anEdge; /* a half-edge with this origin */ - public Object data; /* client's data */ + public GLUvertex next; /* next vertex (never NULL) */ + public GLUvertex prev; /* previous vertex (never NULL) */ + public jogamp.opengl.glu.tessellator.GLUhalfEdge anEdge; /* a half-edge with this origin */ + public Object data; /* client's data */ /* Internal data (keep hidden) */ - public double[] coords = new double[3]; /* vertex location in 3D */ - public double s, t; /* projection onto the sweep plane */ - public int pqHandle; /* to allow deletion from priority queue */ + public double[] coords = new double[3]; /* vertex location in 3D */ + public double s, t; /* projection onto the sweep plane */ + public int pqHandle; /* to allow deletion from priority queue */ } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java index 942dfe8d1..eb48aa5a4 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java @@ -281,8 +281,8 @@ class Mesh { /* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the * mesh connectivity and topology. It changes the mesh so that - * eOrg->Onext <- OLD( eDst->Onext ) - * eDst->Onext <- OLD( eOrg->Onext ) + * eOrg->Onext <- OLD( eDst->Onext ) + * eDst->Onext <- OLD( eOrg->Onext ) * where OLD(...) means the value before the meshSplice operation. * * This can have two effects on the vertex structure: @@ -453,9 +453,9 @@ class Mesh { /* Set the vertex and face information */ eOrg.Sym.Org = eNew.Org; - eNew.Sym.Org.anEdge = eNew.Sym; /* may have pointed to eOrg.Sym */ + eNew.Sym.Org.anEdge = eNew.Sym; /* may have pointed to eOrg.Sym */ eNew.Sym.Lface = eOrg.Sym.Lface; - eNew.winding = eOrg.winding; /* copy old winding information */ + eNew.winding = eOrg.winding; /* copy old winding information */ eNew.Sym.winding = eOrg.Sym.winding; return eNew; diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java index 7d5acd9f8..196e6cf27 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java @@ -60,7 +60,7 @@ class Normal { } static boolean SLANTED_SWEEP = false; - static double S_UNIT_X; /* Pre-normalized */ + static double S_UNIT_X; /* Pre-normalized */ static double S_UNIT_Y; private static final boolean TRUE_PROJECT = false; @@ -75,7 +75,7 @@ class Normal { * direction to be something unusual (ie. not parallel to one of the * coordinate axes). */ - S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ + S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ S_UNIT_Y = 0.86052074622010633; } else { S_UNIT_X = 1.0; diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java index 899df2e3d..474056cc3 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java @@ -76,7 +76,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { freeList = 0; this.leq = leq; - nodes[1].handle = 1; /* so that Minimum() returns NULL */ + nodes[1].handle = 1; /* so that Minimum() returns NULL */ handles[1].key = null; } @@ -171,7 +171,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { } nodes = pqNodes; if (nodes == null) { - nodes = saveNodes; /* restore ptr to free upon return */ + nodes = saveNodes; /* restore ptr to free upon return */ return Integer.MAX_VALUE; } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java index f37f98ace..f9e0225e3 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java @@ -152,7 +152,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } while (LT(leq, keys[order[j]], keys[piv])); Swap(order, i, j); } while (i < j); - Swap(order, i, j); /* Undo last swap */ + Swap(order, i, j); /* Undo last swap */ if (i - p < r - j) { stack[top].p = j + 1; stack[top].r = r; @@ -176,7 +176,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } max = size; initialized = true; - heap.pqInit(); /* always succeeds */ + heap.pqInit(); /* always succeeds */ /* #ifndef NDEBUG p = order; @@ -208,7 +208,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { System.arraycopy( keys, 0, pqKeys, 0, keys.length ); keys = pqKeys; if (keys == null) { - keys = saveKey; /* restore ptr to free upon return */ + keys = saveKey; /* restore ptr to free upon return */ return Integer.MAX_VALUE; } } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java index 34b7ee55b..1801e1c59 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java @@ -79,8 +79,8 @@ class Render { this.render = render; } - long size; /* number of triangles used */ - jogamp.opengl.glu.tessellator.GLUhalfEdge eStart; /* edge where this primitive starts */ + long size; /* number of triangles used */ + jogamp.opengl.glu.tessellator.GLUhalfEdge eStart; /* edge where this primitive starts */ renderCallBack render; }; @@ -295,7 +295,7 @@ class Render { */ jogamp.opengl.glu.tessellator.GLUhalfEdge e; int newState; - int edgeState = -1; /* force edge state output for first vertex */ + int edgeState = -1; /* force edge state output for first vertex */ tess.callBeginOrBeginData(GL.GL_TRIANGLES); diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java index 95eb5dda1..b4a400c1c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java @@ -300,7 +300,7 @@ class Sweep { regPrev = regFirst; ePrev = regFirst.eUp; while (regPrev != regLast) { - regPrev.fixUpperEdge = false; /* placement was OK */ + regPrev.fixUpperEdge = false; /* placement was OK */ reg = RegionBelow(regPrev); e = reg.eUp; if (e.Org != ePrev.Org) { @@ -327,7 +327,7 @@ class Sweep { if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); if (!Mesh.__gl_meshSplice(ePrev, e)) throw new RuntimeException(); } - FinishRegion(tess, regPrev); /* may change reg.eUp */ + FinishRegion(tess, regPrev); /* may change reg.eUp */ ePrev = reg.eUp; regPrev = reg; } @@ -627,11 +627,11 @@ class Sweep { assert (orgUp != tess.event && orgLo != tess.event); assert (!regUp.fixUpperEdge && !regLo.fixUpperEdge); - if (orgUp == orgLo) return false; /* right endpoints are the same */ + if (orgUp == orgLo) return false; /* right endpoints are the same */ tMinUp = Math.min(orgUp.t, dstUp.t); tMaxLo = Math.max(orgLo.t, dstLo.t); - if (tMinUp > tMaxLo) return false; /* t ranges do not overlap */ + if (tMinUp > tMaxLo) return false; /* t ranges do not overlap */ if (Geom.VertLeq(orgUp, orgLo)) { if (Geom.EdgeSign(dstLo, orgUp, orgLo) > 0) return false; @@ -743,7 +743,7 @@ class Sweep { eUp.Org.t = isect.t; eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */ if (eUp.Org.pqHandle == Long.MAX_VALUE) { - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ + tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ tess.pq = null; throw new RuntimeException(); } @@ -959,7 +959,7 @@ class Sweep { regUp.fixUpperEdge = false; } if (!Mesh.__gl_meshSplice(vEvent.anEdge, e)) throw new RuntimeException(); - SweepEvent(tess, vEvent); /* recurse */ + SweepEvent(tess, vEvent); /* recurse */ return; } @@ -1001,9 +1001,9 @@ class Sweep { * * - the degenerate case: if vEvent is close enough to U or L, we * merge vEvent into that edge chain. The subcases are: - * - merging with the rightmost vertex of U or L - * - merging with the active edge of U or L - * - merging with an already-processed portion of U or L + * - merging with the rightmost vertex of U or L + * - merging with the active edge of U or L + * - merging with an already-processed portion of U or L */ { ActiveRegion regUp, regLo, reg; GLUhalfEdge eUp, eLo, eNew; @@ -1063,7 +1063,7 @@ class Sweep { ActiveRegion regUp, reg; GLUhalfEdge e, eTopLeft, eBottomLeft; - tess.event = vEvent; /* for access in EdgeLeq() */ + tess.event = vEvent; /* for access in EdgeLeq() */ DebugEvent(tess); /* Check if this vertex is the right endpoint of an edge that is @@ -1130,7 +1130,7 @@ class Sweep { e.Org.t = t; e.Sym.Org.s = -SENTINEL_COORD; e.Sym.Org.t = t; - tess.event = e.Sym.Org; /* initialize it */ + tess.event = e.Sym.Org; /* initialize it */ reg.eUp = e; reg.windingNumber = 0; @@ -1180,7 +1180,7 @@ class Sweep { DeleteRegion(tess, reg); /* __gl_meshDelete( reg.eUp );*/ } - Dict.dictDeleteDict(tess.dict); /* __gl_dictListDeleteDict */ + Dict.dictDeleteDict(tess.dict); /* __gl_dictListDeleteDict */ } @@ -1199,7 +1199,7 @@ class Sweep { if (Geom.VertEq(e.Org, e.Sym.Org) && e.Lnext.Lnext != e) { /* Zero-length edge, contour has at least 3 edges */ - SpliceMergeVertices(tess, eLnext, e); /* deletes e.Org */ + SpliceMergeVertices(tess, eLnext, e); /* deletes e.Org */ if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); /* e is a self-loop */ e = eLnext; eLnext = e.Lnext; @@ -1243,7 +1243,7 @@ class Sweep { if (v.pqHandle == Long.MAX_VALUE) break; } if (v != vHead || !pq.pqInit()) { /* __gl_pqSortInit */ - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ + tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ tess.pq = null; return false; } @@ -1306,7 +1306,7 @@ class Sweep { * all the vertices in a priority queue. Events are processed in * lexicographic order, ie. * - * e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) + * e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) */ RemoveDegenerateEdges(tess); if (!InitPriorityQ(tess)) return false; /* if error */ diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 085889739..2a2fba8bd 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -49,7 +49,7 @@ import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; public abstract class MacOSXCGLContext extends GLContextImpl -{ +{ protected boolean isNSContext; private CGLExt cglExt; // Table that holds the addresses of the native C-language entry points for @@ -178,7 +178,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl } } } - + protected void releaseImpl() throws GLException { if ( isNSContext ) { if (!CGL.clearCurrentContext(contextHandle)) { @@ -188,7 +188,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl CGL.CGLReleaseContext(contextHandle); } } - + protected void destroyImpl() throws GLException { if ( !isNSContext ) { if (CGL.kCGLNoError != CGL.CGLDestroyContext(contextHandle)) { @@ -254,12 +254,12 @@ public abstract class MacOSXCGLContext extends GLContextImpl } } } - + public String getPlatformExtensionsString() { return ""; } - + protected void swapBuffers() { DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration(); GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)config.getChosenCapabilities(); diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java index 6dba11038..949963fa0 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java @@ -48,7 +48,7 @@ public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext GLContext shareWith) { super(drawable, shareWith); } - + public int getOffscreenContextPixelDataType() { GL gl = getGL(); return gl.isGL2GL3()?GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1; diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java index 6eda3f068..dc5ce26c8 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java @@ -138,7 +138,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext { DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration(); GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getChosenCapabilities(); if (capabilities.getPbufferFloatingPointBuffers() && - !isTigerOrLater) { + !isTigerOrLater) { throw new GLException("Floating-point pbuffers supported only on OS X 10.4 or later"); } // Change our OpenGL mode to match that of any share context before we create ourselves diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 248dfa482..c9cdcad90 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -169,7 +169,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { /** * http://msdn.microsoft.com/en-us/library/ms724832%28v=vs.85%29.aspx - * Windows XP 5.1 + * Windows XP 5.1 */ static final VersionNumber winXPVersionNumber = new VersionNumber ( 5, 1, 0); @@ -199,22 +199,22 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { hasARBReadDrawable = arbReadDrawable; vendor = glVendor; if(null != vendor) { - isVendorNVIDIA = vendor.startsWith("NVIDIA") ; - isVendorATI = vendor.startsWith("ATI") ; + isVendorNVIDIA = vendor.startsWith("NVIDIA") ; + isVendorATI = vendor.startsWith("ATI") ; } - if ( isVendorATI() ) { - final VersionNumber winVersion = new VersionNumber(Platform.getOSVersion(), "."); - final boolean isWinXPOrLess = winVersion.compareTo(winXPVersionNumber) <= 0; - if(DEBUG) { - System.err.println("needsCurrenContext4ARBPFDQueries: "+winVersion+" <= "+winXPVersionNumber+" = "+isWinXPOrLess+" - "+Platform.getOSVersion()); - } - needsCurrenContext4ARBPFDQueries = isWinXPOrLess; - } else { - if(DEBUG) { - System.err.println("needsCurrenContext4ARBPFDQueries: false"); - } - needsCurrenContext4ARBPFDQueries = false; + if ( isVendorATI() ) { + final VersionNumber winVersion = new VersionNumber(Platform.getOSVersion(), "."); + final boolean isWinXPOrLess = winVersion.compareTo(winXPVersionNumber) <= 0; + if(DEBUG) { + System.err.println("needsCurrenContext4ARBPFDQueries: "+winVersion+" <= "+winXPVersionNumber+" = "+isWinXPOrLess+" - "+Platform.getOSVersion()); + } + needsCurrenContext4ARBPFDQueries = isWinXPOrLess; + } else { + if(DEBUG) { + System.err.println("needsCurrenContext4ARBPFDQueries: false"); + } + needsCurrenContext4ARBPFDQueries = false; } } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java index 1899f5212..8859d636a 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -158,7 +158,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio if (0 == hdc) { throw new GLException("Error: HDC is null"); } - + if (!GDI.SetPixelFormat(hdc, caps.getPFDID(), caps.getPFD())) { throw new GLException("Unable to set pixel format " + caps + " for device context " + toHexString(hdc) + @@ -166,7 +166,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio } if (DEBUG) { System.err.println("!!! setPixelFormat (ARB): hdc "+toHexString(hdc) +", "+caps); - } + } setCapsPFD(caps); } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 8c1f5e87c..d765572a6 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -192,25 +192,25 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) ns.getGraphicsConfiguration().getNativeGraphicsConfiguration(); if( !config.isExternal() ) { - if( !config.isDetermined() ) { - updateGraphicsConfiguration(config, chooser, factory, hdc, false, pfdIDs); - } else { - // set PFD if not set yet - int pfdID = -1; - boolean set = false; - if ( 1 > ( pfdID = GDI.GetPixelFormat(hdc) ) ) { - if (!GDI.SetPixelFormat(hdc, config.getPixelFormatID(), config.getPixelFormat())) { - throw new GLException("Unable to set pixel format " + config.getPixelFormatID() + - " for device context " + toHexString(hdc) + - ": error code " + GDI.GetLastError()); - } - set = true; - } - if (DEBUG) { - System.err.println("!!! setPixelFormat (post): hdc "+toHexString(hdc) +", "+pfdID+" -> "+config.getPixelFormatID()+", set: "+set); - Thread.dumpStack(); - } - } + if( !config.isDetermined() ) { + updateGraphicsConfiguration(config, chooser, factory, hdc, false, pfdIDs); + } else { + // set PFD if not set yet + int pfdID = -1; + boolean set = false; + if ( 1 > ( pfdID = GDI.GetPixelFormat(hdc) ) ) { + if (!GDI.SetPixelFormat(hdc, config.getPixelFormatID(), config.getPixelFormat())) { + throw new GLException("Unable to set pixel format " + config.getPixelFormatID() + + " for device context " + toHexString(hdc) + + ": error code " + GDI.GetLastError()); + } + set = true; + } + if (DEBUG) { + System.err.println("!!! setPixelFormat (post): hdc "+toHexString(hdc) +", "+pfdID+" -> "+config.getPixelFormatID()+", set: "+set); + Thread.dumpStack(); + } + } } } finally { ns.unlockSurface(); @@ -400,9 +400,9 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } if ( !extHDC && !pixelFormatSet ) { - config.setPixelFormat(hdc, pixelFormatCaps); + config.setPixelFormat(hdc, pixelFormatCaps); } else { - config.setCapsPFD(pixelFormatCaps); + config.setCapsPFD(pixelFormatCaps); } return true; } @@ -476,9 +476,9 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } if ( !extHDC && !pixelFormatSet ) { - config.setPixelFormat(hdc, pixelFormatCaps); + config.setPixelFormat(hdc, pixelFormatCaps); } else { - config.setCapsPFD(pixelFormatCaps); + config.setCapsPFD(pixelFormatCaps); } return true; } |