From 623dc0fa8cbd9473830a1786f6d49fa808a09439 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 05 May 2019 14:06:12 -0400 Subject: [PATCH] Rename Grafreed --- ImplicitTiler.java | 4 ObjEditor.java | 22 +- MorphNode.java | 6 SwitchNode.java | 6 LA.java | 16 +- Vertex.java | 2 Merge.java | 2 Mocap.java | 4 GenericJoint.java | 2 cMesh.java | 10 BoundaryRep.java | 26 ++-- CameraPane.java | 28 ++-- GrafreedTEMP.java | 11 + cRadio.java | 2 GroupEditor.java | 140 +++++++++++----------- cFileSystemPane.java | 2 RandomNode.java | 2 Object3D.java | 16 +- cVector.java | 2 19 files changed, 152 insertions(+), 151 deletions(-) diff --git a/BoundaryRep.java b/BoundaryRep.java index e938a9a..7b31bc4 100644 --- a/BoundaryRep.java +++ b/BoundaryRep.java @@ -172,16 +172,16 @@ bufV = other.bufV; bufF = other.bufF; - positions = (float[]) GrafreeD.clone(other.positions); - normals = (float[]) GrafreeD.clone(other.normals); - colors = (float[]) GrafreeD.clone(other.colors); - uvmap = (float[]) GrafreeD.clone(other.uvmap); - triangles = (int[]) GrafreeD.clone(other.triangles); + positions = (float[]) Grafreed.clone(other.positions); + normals = (float[]) Grafreed.clone(other.normals); + colors = (float[]) Grafreed.clone(other.colors); + uvmap = (float[]) Grafreed.clone(other.uvmap); + triangles = (int[]) Grafreed.clone(other.triangles); - indices = (int[]) GrafreeD.clone(other.indices); + indices = (int[]) Grafreed.clone(other.indices); - vertices = (Vector<Vertex>) GrafreeD.clone(other.vertices); - faces = (Vector<Face>) GrafreeD.clone(other.faces); + vertices = (Vector<Vertex>) Grafreed.clone(other.vertices); + faces = (Vector<Face>) Grafreed.clone(other.faces); } else { @@ -1518,7 +1518,7 @@ InitFaceIndices(); } - BoundaryRep rep = (BoundaryRep) GrafreeD.clone(this); + BoundaryRep rep = (BoundaryRep) Grafreed.clone(this); //float[] v = new float[100]; for (int loops=1; --loops>=0;) @@ -1548,7 +1548,7 @@ InitFaceIndices(); } - BoundaryRep rep = (BoundaryRep) GrafreeD.clone(this); + BoundaryRep rep = (BoundaryRep) Grafreed.clone(this); //float[] v = new float[100]; for (int loops=10; --loops>=0;) @@ -2670,7 +2670,7 @@ if (Globals.framecount - lastsoundtime > 30) // 0.25 secs { - GrafreeD.wav.play((Math.random()+0.5)/Math.max(tmp.length2(),0.2)); //, 1); + Grafreed.wav.play((Math.random()+0.5)/Math.max(tmp.length2(),0.2)); //, 1); lastsoundtime = Globals.framecount; } @@ -3403,7 +3403,7 @@ k /= x*x + y*y; } else - GrafreeD.Assert(z == 1); + Grafreed.Assert(z == 1); if (k < 0) k = 0; @@ -8233,7 +8233,7 @@ if (!trimmed) return; - GrafreeD.linkUV = false; + Grafreed.linkUV = false; try { diff --git a/CameraPane.java b/CameraPane.java index ea29a28..830f914 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -1628,7 +1628,7 @@ cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0); - float[] colorV = GrafreeD.colorV; + float[] colorV = Grafreed.colorV; /**/ if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0) @@ -2140,7 +2140,7 @@ System.err.println("LIVE = " + Globals.isLIVE()); if (!Globals.isLIVE()) // save sound - GrafreeD.savesound = true; // wav.save(); + Grafreed.savesound = true; // wav.save(); // else repaint(); // start loop // may 2013 } @@ -9542,7 +9542,7 @@ if (!BOXMODE) { - System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")"); + System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")"); } if (!BOXMODE) @@ -9580,7 +9580,7 @@ ABORTED = false; } else - GrafreeD.wav.cursor += 735 * ACSIZE; + Grafreed.wav.cursor += 735 * ACSIZE; if (false) { @@ -10243,11 +10243,11 @@ public void display(GLAutoDrawable drawable) { - if (GrafreeD.savesound && GrafreeD.hassound) + if (Grafreed.savesound && Grafreed.hassound) { - GrafreeD.wav.save(); - GrafreeD.savesound = false; - GrafreeD.hassound = false; + Grafreed.wav.save(); + Grafreed.savesound = false; + Grafreed.hassound = false; } // if (DEBUG_SELECTION) // { @@ -10377,7 +10377,7 @@ Object3D theobject = object; Object3D theparent = object.parent; object.parent = null; - object = (Object3D)GrafreeD.clone(object); + object = (Object3D)Grafreed.clone(object); object.Stripify(); if (theobject.selection == null || theobject.selection.Size() == 0) theobject.PreprocessOcclusion(this); @@ -11283,8 +11283,8 @@ e.printStackTrace(); } - if (GrafreeD.RENDERME > 0) - GrafreeD.RENDERME--; // mechante magouille + if (Grafreed.RENDERME > 0) + Grafreed.RENDERME--; // mechante magouille Globals.ONESTEP = false; } @@ -16427,16 +16427,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) GrafreeD.clone(selectedpoint); + previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint); } } if (!movingcamera && !PAINTMODE) object.editWindow.ScreenFitPoint(); // fev 2014 - if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) + if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) { - Object3D paintobj = GrafreeD.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++); diff --git a/GenericJoint.java b/GenericJoint.java index da925d6..1119276 100644 --- a/GenericJoint.java +++ b/GenericJoint.java @@ -381,7 +381,7 @@ try { //font = FontRender.createFont("Dialog", 11, false, true); - font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt")); + font = new FontRender.GLFont(gl, Grafreed.class.getResourceAsStream("DejaVu_Sans_11.fnt")); } catch (java.io.IOException e) { e.printStackTrace(); diff --git a/GrafreeD.java b/GrafreedTEMP.java similarity index 99% rename from GrafreeD.java rename to GrafreedTEMP.java index 6485281..95f44cd 100644 --- a/GrafreeD.java +++ b/GrafreedTEMP.java @@ -13,7 +13,7 @@ import javax.sound.sampled.*; //import com.jamonapi.*; -public class GrafreeD extends Applet implements ActionListener +public class Grafreed extends Applet implements ActionListener { static boolean NIMBUSLAF = true; @@ -27,7 +27,7 @@ static boolean hassound = false; static boolean savesound = false; - public GrafreeD() + public Grafreed() { javax.swing.Timer timer = new javax.swing.Timer(1000, this); @@ -604,7 +604,7 @@ { String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; System.out.println("javaPath = " + javaPath); - java.net.URL u = new GrafreeD().getClass().getResource("default.png"); + java.net.URL u = new Grafreed().getClass().getResource("default.png"); System.out.println("URL = " + u); @@ -843,7 +843,7 @@ //Monitor mon=MonitorFactory.start("myFirstMonitor"); standAlone = true; - grafreeD = new GrafreeD(); + grafreeD = new Grafreed(); grafreeD.universe = new Composite(); grafreeD.universe.name = "Grafreed"; grafreeD.universe.material = new cMaterial(); @@ -866,6 +866,7 @@ //System.gc(); } } + static int depth = 0; static java.util.Stack stack = new java.util.Stack(); static boolean traceoff = false; // true; @@ -1078,7 +1079,7 @@ } while (avail > 0 && numRead >= 0); return new String(data, 0, pos, "US-ASCII"); } - public static GrafreeD grafreeD; + public static Grafreed grafreeD; public static boolean standAlone = true; public Composite universe; public static Object3D clipboard = new Object3D(); diff --git a/GroupEditor.java b/GroupEditor.java index a0702c4..7fcc3f7 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -98,14 +98,14 @@ void CloneClipboard(boolean supports) { - assert(GrafreeD.clipboard.parent == null); - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? - if (LA.isIdentity(GrafreeD.clipboard.toParent)) - makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); + assert(Grafreed.clipboard.parent == null); + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; + Grafreed.clipboard.get(0).parent = null; // Avoid copy? + if (LA.isIdentity(Grafreed.clipboard.toParent)) + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); else - makeSomething(CloneObject(GrafreeD.clipboard, false)); - GrafreeD.clipboard.get(0).parent = keepparent; + makeSomething(CloneObject(Grafreed.clipboard, false)); + Grafreed.clipboard.get(0).parent = keepparent; } static Object3D CloneObject(Object3D obj, boolean supports) @@ -119,7 +119,7 @@ // obj.support = null; if (!supports) obj.SaveSupports(); - Object3D clone = (Object3D)GrafreeD.clone(obj); + Object3D clone = (Object3D)Grafreed.clone(obj); obj.parent = parent; // obj.support = support; // clone.support = support; // aout 2013 @@ -491,7 +491,7 @@ liveCB.setToolTipText("Enabled animation"); liveCB.addItemListener(this); - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); oneStepButton.setToolTipText("Animate one step forward"); oneStepButton.addActionListener(this); @@ -503,7 +503,7 @@ trackCB.setToolTipText("Enable tracking"); trackCB.addItemListener(this); - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); screenfitButton.setToolTipText("Screen fit"); screenfitButton.addActionListener(this); @@ -512,39 +512,39 @@ if (Globals.ADVANCED) { - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); snapobjectButton.addActionListener(this); snapobjectButton.setToolTipText("Snap Object"); } - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); flashSelectionButton.setToolTipText("Show selection"); flashSelectionButton.addActionListener(this); oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); twoButton.setToolTipText("Show center view only"); twoButton.addActionListener(this); - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); fourButton.addActionListener(this); fourButton.setToolTipText("Show left panel only"); - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); sixButton.setToolTipText("2-column layout left"); sixButton.addActionListener(this); - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); threeButton.setToolTipText("2-column layout right"); threeButton.addActionListener(this); - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); sevenButton.setToolTipText("3-column layout"); sevenButton.addActionListener(this); // - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); rootButton.setToolTipText("Edit selection in new tab"); rootButton.addActionListener(this); - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); closeButton.setToolTipText("Close tab"); closeButton.addActionListener(this); //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); @@ -552,11 +552,11 @@ cGridBag commandsPanel = new cGridBag(); - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); editButton.setToolTipText("Edit selection"); editButton.addActionListener(this); - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); uneditButton.setToolTipText("Unedit selection"); uneditButton.addActionListener(this); @@ -564,11 +564,11 @@ allParamsButton.setToolTipText("Edit all params"); allParamsButton.addActionListener(this); - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); clearPanelButton.setToolTipText("Clear edit panel"); clearPanelButton.addActionListener(this); - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); unselectButton.setToolTipText("Unselect"); unselectButton.addActionListener(this); @@ -1542,9 +1542,9 @@ void Overwrite(int mask) { - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) { - Object3D content = GrafreeD.clipboard.get(0); + Object3D content = Grafreed.clipboard.get(0); if (content instanceof cGroup && ((cGroup)content).transientlink ) content = ((cGroup)content).get(0); @@ -1892,7 +1892,7 @@ if (source == invariantsItem) { System.out.println("Invariants:"); - GrafreeD.grafreeD.universe.invariants(); + Grafreed.grafreeD.universe.invariants(); } else if (source == memoryItem) { @@ -1967,10 +1967,10 @@ } else if (source == duplicateItem) { - Object3D keep = GrafreeD.clipboard; + Object3D keep = Grafreed.clipboard; loadClipboard(false); paste(false); - GrafreeD.clipboard = keep; + Grafreed.clipboard = keep; } else if (source == cloneItem) { @@ -2190,9 +2190,9 @@ // group.selection.get(0).setMasterThis(content); // should be identity // refreshContents(); // } - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) { - Object3D content = GrafreeD.clipboard.get(0); + Object3D content = Grafreed.clipboard.get(0); if (content instanceof cGroup && ((cGroup)content).transientlink ) content = ((cGroup)content).get(0); @@ -2242,9 +2242,9 @@ } else if (source == setMasterItem) { - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) { - Object3D content = GrafreeD.clipboard.get(0); + Object3D content = Grafreed.clipboard.get(0); if (content instanceof cGroup && ((cGroup)content).transientlink ) content = ((cGroup)content).get(0); @@ -2257,9 +2257,9 @@ { if (group.selection.size() == 1) { - if (GrafreeD.clipboard.size() == 1) + if (Grafreed.clipboard.size() == 1) { - Object3D content = GrafreeD.clipboard.get(0); + Object3D content = Grafreed.clipboard.get(0); if (content instanceof cGroup && ((cGroup)content).transientlink ) content = ((cGroup)content).get(0); @@ -3338,9 +3338,9 @@ obj = (Object3D)e.nextElement(); System.out.println("Object is: " + obj); - GrafreeD.AnalyzeObject(obj); + Grafreed.AnalyzeObject(obj); System.out.println("Boundary rep: " + obj.bRep); - GrafreeD.AnalyzeObject(obj.bRep); + Grafreed.AnalyzeObject(obj.bRep); // System.err.println((size/1024) + " KB is the size of " + obj); } @@ -3554,8 +3554,8 @@ void ParseVertices() { - boolean epsequal = GrafreeD.epsequal; - GrafreeD.epsequal = true; + boolean epsequal = Grafreed.epsequal; + Grafreed.epsequal = true; for (int i=0; i<group.selection.size(); i++) { @@ -3580,7 +3580,7 @@ LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); - g.add(GrafreeD.clipboard); + g.add(Grafreed.clipboard); buffer.add(g); } @@ -3595,7 +3595,7 @@ makeSomething(buffer, i==group.selection.size()-1); } - GrafreeD.epsequal = epsequal; + Grafreed.epsequal = epsequal; refreshContents(); } @@ -3745,7 +3745,7 @@ return; Object3D poses = group.selection.get(0); - Object3D ref = GrafreeD.clipboard.get(0); + Object3D ref = Grafreed.clipboard.get(0); Object3D newgroup = new Object3D("Po:" + poses.name); @@ -3939,9 +3939,9 @@ void ClipMesh() { - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) { - Object3D content = GrafreeD.clipboard.get(0); + Object3D content = Grafreed.clipboard.get(0); if (content instanceof cGroup && ((cGroup)content).transientlink ) content = ((cGroup)content).get(0); @@ -3950,7 +3950,7 @@ // { // group.selection.get(i).ClipMesh(GrafreeD.clipboard); // } - group.selection.ClipMesh(GrafreeD.clipboard); + group.selection.ClipMesh(Grafreed.clipboard); } // group.selection.ClipMesh(GrafreeD.clipboard); System.out.println("DONE."); @@ -4290,12 +4290,12 @@ { if (group.selection.isEmpty()) return; - GrafreeD.clipboardIsTempGroup = false; + Grafreed.clipboardIsTempGroup = false; Composite tGroup = null; if (group.selection.size() > 0) // 1) { tGroup = new cGroup(); - GrafreeD.clipboardIsTempGroup = true; + Grafreed.clipboardIsTempGroup = true; } if (cut) @@ -4335,16 +4335,16 @@ //System.out.println("cut " + child); //System.out.println("parent = " + child.parent); // tmp.addChild(child); - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) tGroup.add/*Child*/(tmp); else - GrafreeD.clipboard = tmp; + Grafreed.clipboard = tmp; } else - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) tGroup.add/*Child*/(child); else - GrafreeD.clipboard = child; + Grafreed.clipboard = child; } //ResetModel(); @@ -4376,21 +4376,21 @@ //System.out.println("cut " + elem); //System.out.println("parent = " + elem.parent); // tmp.addChild(elem); - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) tGroup.add/*Child*/(tmp); else - GrafreeD.clipboard = tmp; + Grafreed.clipboard = tmp; } else - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) tGroup.add/*Child*/(child); else - GrafreeD.clipboard = child; + Grafreed.clipboard = child; } } - if (GrafreeD.clipboardIsTempGroup) - GrafreeD.clipboard = tGroup; + if (Grafreed.clipboardIsTempGroup) + Grafreed.clipboard = tGroup; if (cut) { ResetModel(); @@ -4404,7 +4404,7 @@ // return; boolean first = true; - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) { Composite temp; @@ -4415,7 +4415,7 @@ temp = (Composite)Applet3D.clipboard.deepCopy(); */ Object3D elem; - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) { Object3D child = (Object3D)e.nextElement(); @@ -4449,14 +4449,14 @@ //Object3D cb = Applet3D.clipboard; //temp.addChild(cb); //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); - assert(GrafreeD.clipboard.parent == null); - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? - if (LA.isIdentity(GrafreeD.clipboard.toParent)) - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); + assert(Grafreed.clipboard.parent == null); + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; + Grafreed.clipboard.get(0).parent = null; // Avoid copy? + if (LA.isIdentity(Grafreed.clipboard.toParent)) + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); else - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); - GrafreeD.clipboard.get(0).parent = keepparent; + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); + Grafreed.clipboard.get(0).parent = keepparent; } ResetModel(); @@ -4505,9 +4505,9 @@ { boolean first = true; - if (GrafreeD.clipboardIsTempGroup) + if (Grafreed.clipboardIsTempGroup) { - Composite temp = (Composite)GrafreeD.clipboard; + Composite temp = (Composite)Grafreed.clipboard; Object3D copy; for (Enumeration e = temp.children.elements(); e.hasMoreElements();) { @@ -4517,7 +4517,7 @@ } } else { - linkSomething(GrafreeD.clipboard); //.get(0)); + linkSomething(Grafreed.clipboard); //.get(0)); } } } @@ -4962,7 +4962,7 @@ void ImportVRMLX3D() { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { /**/ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); @@ -4979,7 +4979,7 @@ String GetFile(String dialogName) { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); browser.show(); diff --git a/ImplicitTiler.java b/ImplicitTiler.java index 024db48..f476bed 100644 --- a/ImplicitTiler.java +++ b/ImplicitTiler.java @@ -194,8 +194,8 @@ { // Merge normals: tolerance == 0 means use analytic, // tolerance == 10 means use generated normals - BoundaryRep analytic = (BoundaryRep) GrafreeD.clone(bRep); - BoundaryRep generated = (BoundaryRep) GrafreeD.clone(bRep); + BoundaryRep analytic = (BoundaryRep) Grafreed.clone(bRep); + BoundaryRep generated = (BoundaryRep) Grafreed.clone(bRep); analytic.Trim(trim, false, false, stripify, true); generated.Trim(trim, true, false, stripify, true); diff --git a/LA.java b/LA.java index e1aac14..35e7f0e 100644 --- a/LA.java +++ b/LA.java @@ -307,14 +307,14 @@ } - GrafreeD.Assert(Math.abs(src[0][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[1][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[2][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[3][3] - 1) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[0][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[1][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[2][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); + Grafreed.Assert(Math.abs(src[0][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[1][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[2][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[3][3] - 1) <= 1E-15); + Grafreed.Assert(Math.abs(dst[0][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[1][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[2][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); } static double toRadians(double degrees) diff --git a/Merge.java b/Merge.java index be363c1..24d1788 100644 --- a/Merge.java +++ b/Merge.java @@ -192,7 +192,7 @@ try { //font = FontRender.createFont("Dialog", 11, false, true); - font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt")); + font = new FontRender.GLFont(gl, Grafreed.class.getResourceAsStream("DejaVu_Sans_11.fnt")); } catch (java.io.IOException e) { e.printStackTrace(); diff --git a/Mocap.java b/Mocap.java index fc0ff2e..54415a3 100644 --- a/Mocap.java +++ b/Mocap.java @@ -921,7 +921,7 @@ // //GetFileRoot(); // sept 2014: // - GrafreeD.RENDERME = 3; // patch for Merge objects + Grafreed.RENDERME = 3; // patch for Merge objects float[] thedata = bvh.animation.getBoneData(0); os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); @@ -1566,7 +1566,7 @@ lastsoundtime = Globals.framecount; - GrafreeD.hassound = true; + Grafreed.hassound = true; } // else // System.out.println("skipped"); diff --git a/MorphNode.java b/MorphNode.java index 01079dc..951d394 100644 --- a/MorphNode.java +++ b/MorphNode.java @@ -19,7 +19,7 @@ { CreateMaterial(); morphobject.get(0).bRep.SaveSupports(); - bRep = (BoundaryRep) GrafreeD.clone(morphobject.get(0).bRep); + bRep = (BoundaryRep) Grafreed.clone(morphobject.get(0).bRep); morphobject.get(0).bRep.RestoreSupports(); } @@ -30,7 +30,7 @@ duplicate.parent = null; Object3D sup = duplicate.support; duplicate.support = null; - addChild((Object3D)GrafreeD.clone(duplicate)); + addChild((Object3D)Grafreed.clone(duplicate)); duplicate.parent = par; duplicate.support = sup; } @@ -112,7 +112,7 @@ super.deepCopySelf(other); MorphNode bp = (MorphNode)other; - bp.morphweights = (double[]) GrafreeD.clone(morphweights); + bp.morphweights = (double[]) Grafreed.clone(morphweights); } void createEditWindow(GroupEditor callee, boolean newWindow) diff --git a/ObjEditor.java b/ObjEditor.java index 635db64..a6194b1 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -752,7 +752,7 @@ protected static ImageIcon createImageIcon(String path, String description) { - java.net.URL imgURL = GrafreeD.class.getResource(path); + java.net.URL imgURL = Grafreed.class.getResource(path); if (imgURL != null) { return new ImageIcon(imgURL, description); @@ -1476,19 +1476,19 @@ cGridBag editBar = new cGridBag().setVertical(false); - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); createMaterialButton.setToolTipText("Create material"); /* ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); */ - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); clearMaterialButton.setToolTipText("Clear material"); if (Globals.ADVANCED) { - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); } @@ -2396,7 +2396,7 @@ void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { /**/ FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); @@ -3255,8 +3255,8 @@ Globals.ANIMATION ^= true; - GrafreeD.wav.cursor = 0; - GrafreeD.wav.loop = 0; + Grafreed.wav.cursor = 0; + Grafreed.wav.loop = 0; } } else { @@ -4200,7 +4200,7 @@ void load() // throws ClassNotFoundException { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); browser.show(); @@ -4305,7 +4305,7 @@ void saveAs() { - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); browser.setVisible(true); @@ -4416,7 +4416,7 @@ Object3D objectparent = obj.parent; obj.parent = null; - Object3D object = (Object3D) GrafreeD.clone(obj); + Object3D object = (Object3D) Grafreed.clone(obj); obj.parent = objectparent; @@ -4450,7 +4450,7 @@ buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); copy.generatePOV(buffer); - if (GrafreeD.standAlone) + if (Grafreed.standAlone) { FileDialog browser = new FileDialog(frame, "Export POV", 1); browser.show(); diff --git a/Object3D.java b/Object3D.java index 76593d2..aa628e7 100644 --- a/Object3D.java +++ b/Object3D.java @@ -954,7 +954,7 @@ public Object clone() { - return GrafreeD.clone(this); + return Grafreed.clone(this); } Object3D copyExpand() @@ -1729,7 +1729,7 @@ Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); o.bRep = transientrep; if (clone) - o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); + o.bRep = (BoundaryRep) Grafreed.clone(transientrep); o.CreateMaterial(); o.SetAttributes(this, -1); //parent @@ -1742,7 +1742,7 @@ Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); o.bRep = bRep; if (clone) - o.bRep = (BoundaryRep) GrafreeD.clone(bRep); + o.bRep = (BoundaryRep) Grafreed.clone(bRep); o.CreateMaterial(); //o.overwriteThis(this, -1); o.SetAttributes(this, -1); @@ -3204,7 +3204,7 @@ BoundaryRep sup = bRep.support; bRep.support = null; - BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); + BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); // bRep.SplitInTwo(onlyone); // thread... temprep.SplitInTwo(reduction34, onlyone); bRep = temprep; @@ -3728,7 +3728,7 @@ if (child == null) continue; - if (GrafreeD.RENDERME > 0) + if (Grafreed.RENDERME > 0) { if (child instanceof Merge) ((Merge)child).renderme(); @@ -3879,7 +3879,7 @@ if (child == null) continue; - if (GrafreeD.RENDERME > 0) + if (Grafreed.RENDERME > 0) { if (child instanceof Merge) ((Merge)child).renderme(); @@ -4074,7 +4074,7 @@ if (child == null) continue; - if (GrafreeD.RENDERME > 0) + if (Grafreed.RENDERME > 0) { if (child instanceof Merge) ((Merge)child).renderme(); @@ -7567,7 +7567,7 @@ { assert(bRep != null); if (!(support instanceof GenericJoint)) // support.bRep != null) - GrafreeD.Assert(support.bRep == bRep.support); + Grafreed.Assert(support.bRep == bRep.support); } else { diff --git a/RandomNode.java b/RandomNode.java index 5508ba3..b1c0107 100644 --- a/RandomNode.java +++ b/RandomNode.java @@ -95,7 +95,7 @@ //(int)(Math.random()*super.size()); //globalcount++; - gcount += GrafreeD.mix3(rnd+12345,firstchoice*12345,gcount); + gcount += Grafreed.mix3(rnd+12345,firstchoice*12345,gcount); gcount &= 0x7fffffff; diff --git a/SwitchNode.java b/SwitchNode.java index b06c2aa..c6e4dff 100644 --- a/SwitchNode.java +++ b/SwitchNode.java @@ -20,7 +20,7 @@ { CreateMaterial(); switchobject.get(0).bRep.SaveSupports(); - bRep = (BoundaryRep) GrafreeD.clone(switchobject.get(0).bRep); + bRep = (BoundaryRep) Grafreed.clone(switchobject.get(0).bRep); switchobject.get(0).bRep.RestoreSupports(); } @@ -30,7 +30,7 @@ Object3D par = duplicate.parent; duplicate.parent = null; duplicate.SaveSupports(); - addChild((Object3D)GrafreeD.clone(duplicate)); + addChild((Object3D)Grafreed.clone(duplicate)); duplicate.parent = par; duplicate.RestoreSupports(); } @@ -97,7 +97,7 @@ if (bRep == null) { - bRep = (BoundaryRep) GrafreeD.clone(switchobject.get(0).bRep); + bRep = (BoundaryRep) Grafreed.clone(switchobject.get(0).bRep); } if (CameraPane.SUPPORT && display.DrawMode() == display.SHADOW) diff --git a/Vertex.java b/Vertex.java index af5fabf..e8cdcec 100644 --- a/Vertex.java +++ b/Vertex.java @@ -133,7 +133,7 @@ return Math.abs(/*pos.*/x - vert./*pos.*/x) + Math.abs(/*pos.*/y - vert./*pos.*/y) + Math.abs(/*pos.*/z - vert./*pos.*/z) < 0.00001 && // GrafreeD.epsvertex2 && // WARNING: USE 0.0001 for serial issues - (GrafreeD.linkUV || Math.abs(s - vert.s) + Math.abs(t - vert.t) < 0.00001) + (Grafreed.linkUV || Math.abs(s - vert.s) + Math.abs(t - vert.t) < 0.00001) ; // GrafreeD.epsvertex2; } /* diff --git a/cFileSystemPane.java b/cFileSystemPane.java index 9b42459..a446d0f 100644 --- a/cFileSystemPane.java +++ b/cFileSystemPane.java @@ -136,7 +136,7 @@ jTree.setModel(new cFileSystemModel( //java.io.File.listRoots()[1]) - javax.swing.filechooser.FileSystemView.getFileSystemView().getHomeDirectory(), + javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory(), filter )); } diff --git a/cMesh.java b/cMesh.java index d49f23c..9bf2540 100644 --- a/cMesh.java +++ b/cMesh.java @@ -404,8 +404,8 @@ if (ref == null) return; - GrafreeD.epsequal = IsEpsEqual(); - GrafreeD.linkUV = IsLinkUV(); + Grafreed.epsequal = IsEpsEqual(); + Grafreed.linkUV = IsLinkUV(); // BoundaryRep oldrep = transientrep; @@ -419,7 +419,7 @@ Object3D obj = ref.GetObject(); // may 2014: side-effect with UVs!! - obj = (Object3D) GrafreeD.clone(obj); + obj = (Object3D) Grafreed.clone(obj); merge(obj); @@ -429,7 +429,7 @@ bRep.Trim(false, false,false,false,false); System.out.println("------> TRIM " + ref + "; #vertices = " + bRep.VertexCount() + "; #faces = " + bRep.FaceCount()); - GrafreeD.epsequal = false; + Grafreed.epsequal = false; if (transientrep != null && bRep.VertexCount() == transientrep.VertexCount()) { @@ -470,7 +470,7 @@ } else // geometry is merged... - refcopy = (BoundaryRep) GrafreeD.clone(transientrep); + refcopy = (BoundaryRep) Grafreed.clone(transientrep); } transient cVector minima = new cVector(); diff --git a/cRadio.java b/cRadio.java index fdd8308..0714434 100644 --- a/cRadio.java +++ b/cRadio.java @@ -32,7 +32,7 @@ if (link) camera = c; else - camera = (Camera)GrafreeD.clone(c); + camera = (Camera)Grafreed.clone(c); } Object3D object; diff --git a/cVector.java b/cVector.java index 3e59c06..0517b70 100644 --- a/cVector.java +++ b/cVector.java @@ -266,7 +266,7 @@ long ly = Double.doubleToRawLongBits(y); long lz = Double.doubleToRawLongBits(z); - if (GrafreeD.epsequal) + if (Grafreed.epsequal) { return 0; } else -- Gitblit v1.6.2