From b7dce2b3654df801a3904bc270dfcb641fcdb66e Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 02 Nov 2015 19:20:40 -0500 Subject: [PATCH] Rename GrafreeD --- CameraPane.java | 83 ++++++++++++++++++++++++++--------------- 1 files changed, 53 insertions(+), 30 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 3e6f8d9..dda961a 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -228,7 +228,7 @@ void PushMatrix(double[][] matrix, int count) { matrixdepth++; - // GraphreeD.tracein(matrix); + // GrafreeD.tracein(matrix); if (matrix == null) return; // Identity @@ -253,13 +253,13 @@ void PushMatrix(double[][] matrix) { - // GraphreeD.tracein(matrix); + // GrafreeD.tracein(matrix); PushMatrix(matrix,1); } void PushMatrix() { - // GraphreeD.tracein(null); + // GrafreeD.tracein(null); if (matrixdepth++ < MAXSTACK - 1) { currentGL.glPushMatrix(); @@ -274,7 +274,7 @@ { --matrixdepth; - // GraphreeD.traceout(inverse); + // GrafreeD.traceout(inverse); if (inverse == null) return; // Identity @@ -292,7 +292,7 @@ void PopMatrix() { - // GraphreeD.traceout(null); + // GrafreeD.traceout(null); // inverse == null?? if (--matrixdepth < MAXSTACK - 1) { @@ -491,7 +491,7 @@ System.err.println("LIVE = " + isLIVE()); if (!isLIVE()) // save sound - GraphreeD.savesound = true; // wav.save(); + GrafreeD.savesound = true; // wav.save(); // else repaint(); // start loop // may 2013 } @@ -6333,7 +6333,7 @@ { bumpdepth--; - // GraphreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); + // GrafreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); if (bumpstack[bumpdepth] != (texture!=null?texture.texture:null)) { // assert (bumpstack[bumpdepth] == texture); @@ -6363,7 +6363,7 @@ { pigmentdepth--; - // GraphreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); + // GrafreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); if (pigmentstack[pigmentdepth] != (texture!=null?texture.texture:null)) { // assert (pigmentstack[pigmentdepth] == texture); @@ -6694,12 +6694,12 @@ if (bump) { - // GraphreeD.trace("PUSH BUMP " + tex + "(" + bumpdepth + ")" + " : " + texture); + // GrafreeD.trace("PUSH BUMP " + tex + "(" + bumpdepth + ")" + " : " + texture); bumpstack[bumpdepth++] = texture!=null?texture.texture:null; } else { - // GraphreeD.trace("PUSH PIGMENT " + tex + "(" + pigmentdepth + ")" + " : " + texture); + // GrafreeD.trace("PUSH PIGMENT " + tex + "(" + pigmentdepth + ")" + " : " + texture); pigmentstack[pigmentdepth++] = texture!=null?texture.texture:null; } @@ -7628,14 +7628,14 @@ //System.out.println("start frame"); gl.glClear(gl.GL_ACCUM_BUFFER_BIT); - for (jitter = 0; jitter < ACSIZE; jitter++) //, GraphreeD.wav.cursor += LIVE ? 735 : 0) + for (jitter = 0; jitter < ACSIZE; jitter++) //, GrafreeD.wav.cursor += LIVE ? 735 : 0) { framecount++; if (CameraPane.tickcount > 0) CameraPane.tickcount--; -// GraphreeD.wav.cursor += 735; // 44100 Hz / 120 Hz * 2 (for 16 bits) +// GrafreeD.wav.cursor += 735; // 44100 Hz / 120 Hz * 2 (for 16 bits) // restartframe = true; if (options1[2] > 100 && (jitter%2==0)) { @@ -7923,7 +7923,7 @@ if (!BOXMODE) { - System.out.println("image: " + fullname + " (" + (GraphreeD.wav.cursor / 735 / 4) + ")"); + System.out.println("image: " + fullname + " (" + (GrafreeD.wav.cursor / 735 / 4) + ")"); } if (!BOXMODE) @@ -7951,7 +7951,7 @@ { if (ACSIZE > 1) { - // System.err.println("image #" + (GraphreeD.wav.cursor / 735 / 4)); + // System.err.println("image #" + (GrafreeD.wav.cursor / 735 / 4)); } } @@ -7961,7 +7961,7 @@ ABORTED = false; } else - GraphreeD.wav.cursor += 735 * ACSIZE; + GrafreeD.wav.cursor += 735 * ACSIZE; if (false) { @@ -8631,11 +8631,11 @@ public void display(GLAutoDrawable drawable) { - if (GraphreeD.savesound && GraphreeD.hassound) + if (GrafreeD.savesound && GrafreeD.hassound) { - GraphreeD.wav.save(); - GraphreeD.savesound = false; - GraphreeD.hassound = false; + GrafreeD.wav.save(); + GrafreeD.savesound = false; + GrafreeD.hassound = false; } // if (DEBUG_SELECTION) // { @@ -8765,7 +8765,7 @@ Object3D theobject = object; Object3D theparent = object.parent; object.parent = null; - object = (Object3D)GraphreeD.clone(object); + object = (Object3D)GrafreeD.clone(object); object.Stripify(); if (theobject.selection == null || theobject.selection.Size() == 0) theobject.PreprocessOcclusion(this); @@ -9660,8 +9660,8 @@ e.printStackTrace(); } - if (GraphreeD.RENDERME > 0) - GraphreeD.RENDERME--; // mechante magouille + if (GrafreeD.RENDERME > 0) + GrafreeD.RENDERME--; // mechante magouille ONESTEP = false; } @@ -9734,7 +9734,7 @@ BindTextures(DEFAULT_TEXTURES, 2); } //System.out.println("--> " + stackdepth); -// GraphreeD.traceon(); +// GrafreeD.traceon(); // DRAW object.draw(this, /*(Composite)*/ object, false, false); @@ -9765,17 +9765,31 @@ debugpoint2.material.color = 0.75f; debugpoint2.material.modulation = 0.75f; + debugpoint3.radius = radius; + debugpoint3.recalculate(); + debugpoint3.material = new cMaterial(); + debugpoint3.material.color = 0.5f; + debugpoint3.material.modulation = 0.75f; + + debugpoint4.radius = radius; + debugpoint4.recalculate(); + debugpoint4.material = new cMaterial(); + debugpoint4.material.color = 0f; + debugpoint4.material.modulation = 0.75f; + InitPoints(radius); } selectedpoint.draw(this, /*(Composite)*/ null, false, false); - //debugpoint.draw(this, /*(Composite)*/ null, false); - //debugpoint2.draw(this, /*(Composite)*/ null, false); - DrawPoints(this); + debugpoint.draw(this, /*(Composite)*/ null, false,false); + debugpoint2.draw(this, /*(Composite)*/ null, false,false); + debugpoint3.draw(this, /*(Composite)*/ null, false,false); + debugpoint4.draw(this, /*(Composite)*/ null, false,false); + // DrawPoints(this); } // debugstuff.draw(this, /*(Composite)*/ null, false); } -// GraphreeD.traceoff(); +// GrafreeD.traceoff(); //System.out.println(stackdepth); if (drawMode == 0) { @@ -11092,10 +11106,17 @@ "MOV final.z, zero.x;" + "MOV final.a, one.w;":"" ) + + /* (NORMALdebug?"MOV final.x, normal.x;" + "MOV final.y, normal.y;" + "MOV final.z, normal.z;" + "MOV final.a, one.w;":"" + ) + + */ + (NORMALdebug?"SUB final.x, one.x, final.x;" + + "SUB final.y, one.x, final.y;" + + "SUB final.z, one.x, final.z;" + + "MOV final.a, final.a;":"" ) + // "MOV final, bumpmap;" + "MOV result.color, final;" + @@ -14700,16 +14721,16 @@ System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2])); } - previousselectedpoint = (Sphere) GraphreeD.clone(selectedpoint); + previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint); } } if (!movingcamera && !PAINTMODE) object.editWindow.ScreenFitPoint(); // fev 2014 - if (PAINTMODE && GraphreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) + if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) { - Object3D paintobj = GraphreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); + Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); Object3D group = new Object3D("inst" + paintcount++); @@ -15283,6 +15304,8 @@ static Sphere previousselectedpoint = null; static Sphere debugpoint = new Sphere(); static Sphere debugpoint2 = new Sphere(); + static Sphere debugpoint3 = new Sphere(); + static Sphere debugpoint4 = new Sphere(); static Sphere debugpoints[] = new Sphere[8]; -- Gitblit v1.6.2