Normand Briere
2019-06-11 5e6a6f3319f0c4c687fe71952ac9ecc17792b83a
Object3D.java
....@@ -5,6 +5,7 @@
55 import java.util.Vector;
66
77 import javax.media.j3d.Transform3D;
8
+import javax.media.opengl.GL;
89 import javax.vecmath.Vector3d;
910
1011 import javax.imageio.ImageIO;
....@@ -13,11 +14,15 @@
1314 import //weka.core.
1415 matrix.Matrix;
1516
17
+import java.util.UUID;
18
+
1619 //import net.sourceforge.sizeof.SizeOf;
1720 public class Object3D extends Vector<Object3D> implements java.io.Serializable, iSendInfo //, aurelienribon.tweenengine.TweenAccessor<Object3D>
1821 {
1922 //static final long serialVersionUID = -607422624994562685L;
2023 static final long serialVersionUID = 5022536242724664900L;
24
+
25
+ private UUID uuid = UUID.randomUUID();
2126
2227 ScriptNode scriptnode;
2328
....@@ -299,6 +304,7 @@
299304 }
300305
301306 boolean live = false;
307
+ boolean dontselect = false;
302308 boolean hide = false;
303309 boolean link2master = false; // performs reset support/master at each frame
304310 boolean marked = false; // animation node
....@@ -430,16 +436,16 @@
430436 {
431437 Object3D copy = this;
432438
433
- Camera parentcam = CameraPane.theRenderer.manipCamera;
439
+ Camera parentcam = Globals.theRenderer.ManipCamera();
434440
435
- if (CameraPane.theRenderer.manipCamera == CameraPane.theRenderer.cameras[0])
441
+ if (Globals.theRenderer.ManipCamera() == Globals.theRenderer.Cameras()[0])
436442 {
437
- parentcam = CameraPane.theRenderer.cameras[1];
443
+ parentcam = Globals.theRenderer.Cameras()[1];
438444 }
439445
440
- if (CameraPane.theRenderer.manipCamera == CameraPane.theRenderer.cameras[1])
446
+ if (Globals.theRenderer.ManipCamera() == Globals.theRenderer.Cameras()[1])
441447 {
442
- parentcam = CameraPane.theRenderer.cameras[0];
448
+ parentcam = Globals.theRenderer.Cameras()[0];
443449 }
444450
445451 if (this == parentcam)
....@@ -447,7 +453,7 @@
447453 //assert(this instanceof Camera);
448454
449455 for (int count = parentcam.GetTransformCount(); --count>=0;)
450
- LA.xformPos(CameraPane.theRenderer.targetLookAt, parentcam.toParent, CameraPane.theRenderer.targetLookAt);
456
+ LA.xformPos(Globals.theRenderer.TargetLookAt(), parentcam.toParent, Globals.theRenderer.TargetLookAt());
451457 }
452458
453459 copy.marked ^= true;
....@@ -467,7 +473,7 @@
467473 //assert(this instanceof Camera);
468474
469475 for (int count = parentcam.GetTransformCount(); --count>=0;)
470
- LA.xformPos(CameraPane.theRenderer.targetLookAt, parentcam.fromParent, CameraPane.theRenderer.targetLookAt);
476
+ LA.xformPos(Globals.theRenderer.TargetLookAt(), parentcam.fromParent, Globals.theRenderer.TargetLookAt());
471477 }
472478
473479 copy.Touch(); // display list issue
....@@ -602,7 +608,7 @@
602608 return;
603609 }
604610
605
- if (CameraPane.fromscript)
611
+ if (Globals.fromscript)
606612 {
607613 transformcount = 0;
608614 return;
....@@ -773,7 +779,7 @@
773779 if (step == 0)
774780 step = 1;
775781 if (maxcount == 0)
776
- maxcount = 2048; // 4;
782
+ maxcount = 128; // 2048; // 4;
777783 // if (acceleration == 0)
778784 // acceleration = 10;
779785 if (delay == 0) // serial
....@@ -796,7 +802,7 @@
796802
797803 if (marked && Globals.isLIVE() && live &&
798804 //TEMP21aug2018
799
- Globals.DrawMode() == iCameraPane.SHADOW &&
805
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
800806 currentframe != Globals.framecount)
801807 {
802808 currentframe = Globals.framecount;
....@@ -911,6 +917,11 @@
911917 fromParent = null; // LA.newMatrix();
912918 bRep = null; // new BoundaryRep();
913919
920
+ if (oname != null && oname.equals("LeftHand"))
921
+ {
922
+ name = oname;
923
+ }
924
+
914925 /*
915926 float hue = (float)Math.random();
916927 Color col;
....@@ -953,7 +964,7 @@
953964
954965 public Object clone()
955966 {
956
- return GrafreeD.clone(this);
967
+ return Grafreed.clone(this);
957968 }
958969
959970 Object3D copyExpand()
....@@ -1469,7 +1480,7 @@
14691480 BoundaryRep.SEUIL = other.material.cameralight;
14701481
14711482 // Set default to 0.1
1472
- BoundaryRep.SEUIL /= 2;
1483
+ BoundaryRep.SEUIL /= 4; // 2;
14731484 System.out.println("SEUIL = " + BoundaryRep.SEUIL);
14741485 }
14751486
....@@ -1728,7 +1739,7 @@
17281739 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17291740 o.bRep = transientrep;
17301741 if (clone)
1731
- o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
1742
+ o.bRep = (BoundaryRep) Grafreed.clone(transientrep);
17321743 o.CreateMaterial();
17331744 o.SetAttributes(this, -1);
17341745 //parent
....@@ -1741,7 +1752,7 @@
17411752 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17421753 o.bRep = bRep;
17431754 if (clone)
1744
- o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
1755
+ o.bRep = (BoundaryRep) Grafreed.clone(bRep);
17451756 o.CreateMaterial();
17461757 //o.overwriteThis(this, -1);
17471758 o.SetAttributes(this, -1);
....@@ -1828,12 +1839,15 @@
18281839 if (obj.name == null)
18291840 continue; // can't be a null one
18301841
1842
+ // Try perfect match first.
18311843 if (n.equals(obj.name))
18321844 {
18331845 theobj = obj;
18341846 count++;
18351847 }
18361848 }
1849
+
1850
+ // not needed: n = n.split(":")[0]; // Poser generates a count
18371851
18381852 if (count != 1)
18391853 for (int i=Size(); --i>=0;)
....@@ -2299,6 +2313,7 @@
22992313 {
23002314 if (newWindow)
23012315 {
2316
+ new Exception().printStackTrace();
23022317 System.exit(0);
23032318 if (parent != null)
23042319 {
....@@ -2475,13 +2490,13 @@
24752490 return retval;
24762491 }
24772492
2478
- void doEditDrag(ClickInfo info)
2493
+ void doEditDrag(ClickInfo info, boolean opposite)
24792494 {
24802495 switch (doSomething)
24812496 {
24822497 case 1: // '\001'
24832498 //super.
2484
- doEditDrag0(info);
2499
+ doEditDrag0(info, opposite);
24852500 break;
24862501
24872502 case 2: // '\002'
....@@ -2494,11 +2509,11 @@
24942509 {
24952510 //sel.hitSomething = childToDrag.hitSomething;
24962511 //childToDrag.doEditDrag(info);
2497
- sel.doEditDrag(info);
2512
+ sel.doEditDrag(info, opposite);
24982513 } else
24992514 {
25002515 //super.
2501
- doEditDrag0(info);
2516
+ doEditDrag0(info, opposite);
25022517 }
25032518 }
25042519 break;
....@@ -2905,7 +2920,8 @@
29052920 {
29062921 if (bRep != null)
29072922 {
2908
- bRep.GenUV();
2923
+ bRep.GenUV(); //1);
2924
+ //bRep.UnfoldUV();
29092925 Touch();
29102926 }
29112927 }
....@@ -2980,6 +2996,33 @@
29802996 blockloop = false;
29812997 }
29822998
2999
+ void TransformChildren()
3000
+ {
3001
+ if (toParent != null)
3002
+ {
3003
+ for (int i=Size(); --i>=0;)
3004
+ {
3005
+ Object3D v = get(i);
3006
+
3007
+ if (v.toParent == null)
3008
+ {
3009
+ v.toParent = LA.newMatrix();
3010
+ v.fromParent = LA.newMatrix();
3011
+ }
3012
+
3013
+// LA.matConcat(v.toParent, toParent, v.toParent);
3014
+// LA.matConcat(fromParent, v.fromParent, v.fromParent);
3015
+ LA.matConcat(toParent, v.toParent, v.toParent);
3016
+ LA.matConcat(v.fromParent, fromParent, v.fromParent);
3017
+ }
3018
+
3019
+ toParent = null; // LA.matIdentity(toParent);
3020
+ fromParent = null; // LA.matIdentity(fromParent);
3021
+
3022
+ Touch();
3023
+ }
3024
+ }
3025
+
29833026 void TransformGeometry()
29843027 {
29853028 Object3D obj = this;
....@@ -3201,9 +3244,11 @@
32013244
32023245 BoundaryRep sup = bRep.support;
32033246 bRep.support = null;
3204
- BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep);
3247
+ BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep);
32053248 // bRep.SplitInTwo(onlyone); // thread...
3206
- temprep.SplitInTwo(reduction34, onlyone);
3249
+
3250
+ while(temprep.SplitInTwo(reduction34, onlyone));
3251
+
32073252 bRep = temprep;
32083253 bRep.support = sup;
32093254 Touch();
....@@ -3725,7 +3770,7 @@
37253770 if (child == null)
37263771 continue;
37273772
3728
- if (GrafreeD.RENDERME > 0)
3773
+ if (Grafreed.RENDERME > 0)
37293774 {
37303775 if (child instanceof Merge)
37313776 ((Merge)child).renderme();
....@@ -3876,7 +3921,7 @@
38763921 if (child == null)
38773922 continue;
38783923
3879
- if (GrafreeD.RENDERME > 0)
3924
+ if (Grafreed.RENDERME > 0)
38803925 {
38813926 if (child instanceof Merge)
38823927 ((Merge)child).renderme();
....@@ -4071,7 +4116,7 @@
40714116 if (child == null)
40724117 continue;
40734118
4074
- if (GrafreeD.RENDERME > 0)
4119
+ if (Grafreed.RENDERME > 0)
40754120 {
40764121 if (child instanceof Merge)
40774122 ((Merge)child).renderme();
....@@ -4678,7 +4723,7 @@
46784723
46794724 cTreePath SelectLeaf(int indexcount, boolean deselect)
46804725 {
4681
- if (hide)
4726
+ if (hide || dontselect)
46824727 return null;
46834728
46844729 if (count <= 0)
....@@ -4704,7 +4749,7 @@
47044749
47054750 cTreePath Select(int indexcount, boolean deselect)
47064751 {
4707
- if (hide)
4752
+ if (hide || dontselect)
47084753 return null;
47094754
47104755 if (count <= 0)
....@@ -4854,7 +4899,7 @@
48544899 return globalTransform;
48554900 }
48564901
4857
- void PreprocessOcclusion(CameraPane cp)
4902
+ void PreprocessOcclusion(iCameraPane cp)
48584903 {
48594904 /*
48604905 if (AOdone)
....@@ -5156,10 +5201,34 @@
51565201
51575202 // System.out.println("Fullname = " + fullname);
51585203
5159
- if (fullname.name.indexOf(":") == -1)
5160
- return fullname.name;
5204
+ // Does not work on Windows due to C:
5205
+// if (fullname.name.indexOf(":") == -1)
5206
+// return fullname.name;
5207
+//
5208
+// return fullname.name.substring(0,fullname.name.indexOf(":"));
51615209
5162
- return fullname.name.substring(0,fullname.name.indexOf(":"));
5210
+ String[] split = fullname.name.split(":");
5211
+
5212
+ if (split.length == 0)
5213
+ {
5214
+ return "";
5215
+ }
5216
+
5217
+ if (split.length <= 2)
5218
+ {
5219
+ if (fullname.name.endsWith(":"))
5220
+ {
5221
+ // Windows
5222
+ return fullname.name.substring(0, fullname.name.length()-1);
5223
+ }
5224
+
5225
+ return split[0];
5226
+ }
5227
+
5228
+ // Windows
5229
+ assert(split.length == 4);
5230
+
5231
+ return split[0] + ":" + split[1];
51635232 }
51645233
51655234 static String GetBump(cTexture fullname)
....@@ -5168,10 +5237,38 @@
51685237 return "";
51695238
51705239 // System.out.println("Fullname = " + fullname);
5171
- if (fullname.name.indexOf(":") == -1)
5172
- return "";
5173
-
5174
- return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length());
5240
+ // Does not work on Windows due to C:
5241
+// if (fullname.name.indexOf(":") == -1)
5242
+// return "";
5243
+//
5244
+// return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length());
5245
+ String[] split = fullname.name.split(":");
5246
+
5247
+ if (split.length == 0)
5248
+ {
5249
+ return "";
5250
+ }
5251
+
5252
+ if (split.length == 1)
5253
+ {
5254
+ return "";
5255
+ }
5256
+
5257
+ if (split.length == 2)
5258
+ {
5259
+ if (fullname.name.endsWith(":"))
5260
+ {
5261
+ // Windows
5262
+ return "";
5263
+ }
5264
+
5265
+ return split[1];
5266
+ }
5267
+
5268
+ // Windows
5269
+ assert(split.length == 4);
5270
+
5271
+ return split[2] + ":" + split[3];
51755272 }
51765273
51775274 String GetPigmentTexture()
....@@ -5245,7 +5342,7 @@
52455342 System.out.print("; textures = " + textures);
52465343 System.out.println("; usedtextures = " + usedtextures);
52475344
5248
- if (GetTextures() == null)
5345
+ if (GetTextures() == null) // What is that??
52495346 GetTextures().name = ":";
52505347
52515348 String texname = tex;
....@@ -5276,6 +5373,43 @@
52765373 child.ResetPigmentTexture();
52775374 blockloop = false;
52785375 }
5376
+ }
5377
+
5378
+ UUID GetUUID()
5379
+ {
5380
+ if (uuid == null)
5381
+ {
5382
+ // Serial
5383
+ uuid = UUID.randomUUID();
5384
+ }
5385
+
5386
+ return uuid;
5387
+ }
5388
+
5389
+ Object3D GetObject(UUID uid)
5390
+ {
5391
+ if (blockloop)
5392
+ return null;
5393
+
5394
+ if (GetUUID().equals(uid))
5395
+ return this;
5396
+
5397
+ int nb = Size();
5398
+ for (int i = 0; i < nb; i++)
5399
+ {
5400
+ Object3D child = (Object3D) get(i);
5401
+
5402
+ if (child == null)
5403
+ continue;
5404
+
5405
+ blockloop = true;
5406
+ Object3D obj = child.GetObject(uid);
5407
+ blockloop = false;
5408
+ if (obj != null)
5409
+ return obj;
5410
+ }
5411
+
5412
+ return null;
52795413 }
52805414
52815415 void SetBumpTexture(String tex)
....@@ -5322,11 +5456,12 @@
53225456 boolean NeedSupport()
53235457 {
53245458 return
5325
- CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null
5459
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
53265460 // PROBLEM with CROWD!!
5327
- && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD);
5461
+ && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
53285462 }
53295463
5464
+ static boolean DEBUG_SELECTION = false;
53305465
53315466 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
53325467 {
....@@ -5338,7 +5473,7 @@
53385473 }
53395474
53405475 if (display.DrawMode() == iCameraPane.SELECTION &&
5341
- hide)
5476
+ (hide || dontselect))
53425477 return;
53435478
53445479 if (name != null && name.contains("sclera"))
....@@ -5365,12 +5500,12 @@
53655500 }
53665501
53675502 if ((//display.DrawMode() == CameraPane.SHADOW ||
5368
- display.DrawMode() == CameraPane.SELECTION || CameraPane.DEBUG_SELECTION) && HasTransparency())
5503
+ display.DrawMode() == iCameraPane.SELECTION || display.IsDebugSelection()) && HasTransparency())
53695504 {
53705505 return;
53715506 }
53725507
5373
- javax.media.opengl.GL gl = display.GetGL();
5508
+ //javax.media.opengl.GL gl = display.GetGL();
53745509
53755510 /*
53765511 if (touched)
....@@ -5406,7 +5541,7 @@
54065541
54075542 boolean compiled = false;
54085543
5409
- boolean selectmode = display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION;
5544
+ boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
54105545
54115546 if (!selectmode && //display.DrawMode() != display.SELECTION &&
54125547 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5422,7 +5557,7 @@
54225557 //if (displaylist == -1 && usecalllists)
54235558 if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
54245559 {
5425
- bRep.displaylist = gl.glGenLists(1);
5560
+ bRep.displaylist = display.GenList();
54265561 assert(bRep.displaylist != 0);
54275562 // System.err.println("glGenLists: " + bRep.displaylist + " for " + this);
54285563 //System.out.println("\tgen list " + list);
....@@ -5434,14 +5569,16 @@
54345569 if (usecalllists)
54355570 {
54365571 // System.err.println("new list " + bRep.displaylist + " for " + this);
5437
- gl.glNewList(bRep.displaylist, gl.GL_COMPILE); //_AND_EXECUTE);
5572
+ display.NewList(bRep.displaylist);
54385573 }
5574
+
54395575 CallList(display, root, selected, blocked);
5576
+
54405577 // compiled = true;
54415578 if (usecalllists)
54425579 {
54435580 // System.err.println("end list " + bRep.displaylist + " for " + this);
5444
- gl.glEndList();
5581
+ display.EndList();
54455582 }
54465583 //gl.glDrawBuffer(gl.GL_BACK);
54475584 // XXX touched = false;
....@@ -5484,12 +5621,12 @@
54845621
54855622 // frustum culling
54865623 if (CameraPane.FRUSTUM && !blocked && !IsInfinite() && GetBRep() != null // && GetBRep().VertexCount() != 1260 // default grid
5487
- && display.DrawMode() != CameraPane.SELECTION)
5624
+ && display.DrawMode() != iCameraPane.SELECTION)
54885625 {
5489
- if (display.DrawMode() == CameraPane.SHADOW)
5626
+ if (display.DrawMode() == iCameraPane.SHADOW)
54905627 {
54915628 if (!link2master // tricky to cull in shadow mode.
5492
- && GetBRep().FrustumCull(this, gl, display.LightCamera(), true))
5629
+ && GetBRep().FrustumCull(this, null, display.LightCamera(), true))
54935630 {
54945631 //System.out.print("CULLED");
54955632 culled = true;
....@@ -5497,7 +5634,7 @@
54975634 }
54985635 else
54995636 //GetBRep().getBounds(v0, v1, this);
5500
- if (GetBRep().FrustumCull(this, gl, display.RenderCamera(), false))
5637
+ if (GetBRep().FrustumCull(this, null, display.RenderCamera(), false))
55015638 culled = true;
55025639
55035640 // LA.xformPos(v0, display.renderCamera.toScreen, v0);
....@@ -5533,11 +5670,11 @@
55335670
55345671
55355672 if (!culled)
5536
- if (display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION)
5673
+ if (display.DrawMode() == display.SELECTION || display.IsDebugSelection())
55375674 {
55385675 if (GetBRep() != null)
55395676 {
5540
- CameraPane.NextIndex(this, gl);
5677
+ display.NextIndex();
55415678 // vertex color conflict : gl.glCallList(list);
55425679 DrawNode(display, root, selected);
55435680 if (this instanceof BezierPatch)
....@@ -5578,7 +5715,17 @@
55785715 tex = GetTextures();
55795716 }
55805717
5581
- display.BindTextures(tex, texres);
5718
+ boolean failed = false;
5719
+
5720
+ try
5721
+ {
5722
+ display.BindTextures(tex, texres);
5723
+ }
5724
+ catch (Exception e)
5725
+ {
5726
+ System.err.println("FAILED: " + this);
5727
+ failed = true;
5728
+ }
55825729
55835730 if (!compiled)
55845731 {
....@@ -5594,13 +5741,14 @@
55945741
55955742 // System.err.println("glCallList: " + bRep.displaylist + " for " + this);
55965743 assert(bRep.displaylist != 0);
5597
- gl.glCallList(bRep.displaylist);
5744
+ display.CallList(bRep.displaylist);
55985745 // june 2013 drawSelf(display, root, selected);
55995746 }
56005747 }
56015748 }
56025749
5603
- display.ReleaseTextures(tex);
5750
+ if (!failed)
5751
+ display.ReleaseTextures(tex);
56045752
56055753 display.PopMaterial(this, selected);
56065754 }
....@@ -5729,6 +5877,9 @@
57295877
57305878 void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57315879 {
5880
+ if (display.DrawMode() == iCameraPane.SELECTION && dontselect)
5881
+ return;
5882
+
57325883 if (hide)
57335884 return;
57345885 // shadow optimisation
....@@ -5854,6 +6005,9 @@
58546005 if (display.DrawMode() == display.SHADOW && projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
58556006 return; // no shadow for transparent objects
58566007
6008
+ if (display.DrawMode() == iCameraPane.SELECTION && dontselect)
6009
+ return;
6010
+
58576011 if (hide)
58586012 return;
58596013
....@@ -5894,9 +6048,10 @@
58946048 return;
58956049 }
58966050
6051
+ //bRep.GenUV(1/material.diffuseness);
58976052 // bRep.lock = true;
58986053
5899
- javax.media.opengl.GL gl = display.GetGL();
6054
+ //javax.media.opengl.GL gl = display.GetGL();
59006055
59016056 if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera)
59026057 {
....@@ -5913,23 +6068,7 @@
59136068
59146069 bRep.getMinMax(min, max, 100);
59156070
5916
- gl.glBegin(gl.GL_LINES);
5917
-
5918
- gl.glVertex3d(min.x, min.y, min.z);
5919
- gl.glVertex3d(min.x, min.y, max.z);
5920
- gl.glVertex3d(min.x, min.y, min.z);
5921
- gl.glVertex3d(min.x, max.y, min.z);
5922
- gl.glVertex3d(min.x, min.y, min.z);
5923
- gl.glVertex3d(max.x, min.y, min.z);
5924
-
5925
- gl.glVertex3d(max.x, max.y, max.z);
5926
- gl.glVertex3d(min.x, max.y, max.z);
5927
- gl.glVertex3d(max.x, max.y, max.z);
5928
- gl.glVertex3d(max.x, min.y, max.z);
5929
- gl.glVertex3d(max.x, max.y, max.z);
5930
- gl.glVertex3d(max.x, max.y, min.z);
5931
-
5932
- gl.glEnd();
6071
+ display.DrawBox(min, max);
59336072
59346073 return;
59356074 }
....@@ -5973,7 +6112,7 @@
59736112 {
59746113 //throw new Error();
59756114
5976
- boolean selectmode = display.DrawMode() == display.SELECTION || CameraPane.DEBUG_SELECTION;
6115
+ boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
59776116
59786117 int[] strips = bRep.getRawIndices();
59796118
....@@ -5983,178 +6122,14 @@
59836122 new Exception().printStackTrace();
59846123 return;
59856124 }
5986
-
5987
- // TRIANGLE STRIP ARRAY
5988
- if (bRep.trimmed)
5989
- {
5990
- float[] v = bRep.getRawVertices();
5991
- float[] n = bRep.getRawNormals();
5992
- float[] c = bRep.getRawColors();
5993
- float[] uv = bRep.getRawUVMap();
5994
-
5995
- int count2 = 0;
5996
- int count3 = 0;
5997
-
5998
- if (n.length > 0)
5999
- {
6000
- for (int i = 0; i < strips.length; i++)
6001
- {
6002
- gl.glBegin(gl.GL_TRIANGLE_STRIP);
6003
-
6004
- /*
6005
- boolean locked = false;
6006
- float eps = 0.1f;
6007
- boolean wrap = CameraPane.UVWRAP; // true; // UV WRAP TEXTURE ISSUE: true = artifacts, false = nice
6008
-
6009
- int dot = 0;
6010
-
6011
- if ((dot&1) == 0)
6012
- dot |= (Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps) ? 3 : 1;
6013
-
6014
- if (wrap || (dot&2) != 0) // Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps)
6015
- gl.glTexCoord2f((float) qv.s, (float) qv.t);
6016
- else
6017
- {
6018
- locked = true;
6019
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6020
- }
6021
- //System.out.println("vertexq = " + qv.x + ", " + qv.y + ", " + qv.z);
6022
- gl.glVertex3f((float) qv.x, (float) qv.y, (float) qv.z);
6023
- if (hasnorm)
6024
- {
6025
- //System.out.println("normalr = " + rv.norm.x + ", " + rv.norm.y + ", " + rv.norm.z);
6026
- gl.glNormal3f((float) rv.norm.x, (float) rv.norm.y, (float) rv.norm.z);
6027
- }
6028
-
6029
- if ((dot&4) == 0)
6030
- dot |= (Math.abs(rv.s - pv.s) < eps && Math.abs(rv.t - pv.t) < eps) ? 12 : 4;
6031
-
6032
- if (wrap || !locked && (dot&8) != 0)
6033
- gl.glTexCoord2f((float) rv.s, (float) rv.t);
6034
- else
6035
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6036
-
6037
- f.dot = dot;
6038
- */
6039
-
6040
- if (!selectmode)
6041
- {
6042
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6043
- {
6044
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6045
- } else
6046
- {
6047
- gl.glNormal3f(0, 0, 1);
6048
- }
6049
-
6050
- if (c != null)
6051
- //System.out.println("glcolor = " + c[count3] + ", " + c[count3+1] + ", " + c[count3+2]);
6052
- {
6053
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6054
- }
6055
- }
6056
- if (flipV)
6057
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6058
- else
6059
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6060
- //System.out.println("vertex1 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
6061
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6062
-
6063
- count2 += 2;
6064
- count3 += 3;
6065
- if (!selectmode)
6066
- {
6067
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6068
- {
6069
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6070
- } else
6071
- {
6072
- gl.glNormal3f(0, 0, 1);
6073
- }
6074
- if (c != null)
6075
- {
6076
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6077
- }
6078
- }
6079
- if (flipV)
6080
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6081
- else
6082
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6083
- //System.out.println("vertex2 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
6084
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6085
-
6086
- count2 += 2;
6087
- count3 += 3;
6088
- for (int j = 0; j < strips[i] - 2; j++)
6089
- {
6090
- //gl.glTexCoord2d(...);
6091
- if (!selectmode)
6092
- {
6093
- if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0)
6094
- {
6095
- gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]);
6096
- } else
6097
- {
6098
- gl.glNormal3f(0, 0, 1);
6099
- }
6100
- if (c != null)
6101
- {
6102
- gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
6103
- }
6104
- }
6105
-
6106
- if (flipV)
6107
- gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
6108
- else
6109
- gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
6110
- //System.out.println("coord3 = " + uv[count2] + ", " + uv[count2+1]);
6111
- gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
6112
- count2 += 2;
6113
- count3 += 3;
6114
- }
6115
-
6116
- gl.glEnd();
6117
- }
6118
- }
6119
-
6120
- assert count3 == v.length;
6121
- }
6122
- else // !trimmed
6123
- {
6124
- int count = 0;
6125
- for (int i = 0; i < strips.length; i++)
6126
- {
6127
- gl.glBegin(gl.GL_TRIANGLE_STRIP);
6128
-
6129
- Vertex p = bRep.GetVertex(bRep.indices[count++]);
6130
- Vertex q = bRep.GetVertex(bRep.indices[count++]);
6131
-
6132
- drawVertex(gl, p, selectmode);
6133
- drawVertex(gl, q, selectmode);
6134
-
6135
- for (int j = 0; j < strips[i] - 2; j++)
6136
- {
6137
- Vertex r = bRep.GetVertex(bRep.indices[count++]);
6138
-
6139
-// if (j%2 == 0)
6140
-// drawFace(p, q, r, display, null);
6141
-// else
6142
-// drawFace(p, r, q, display, null);
6143
-
6144
-// p = q;
6145
-// q = r;
6146
- drawVertex(gl, r, selectmode);
6147
- }
6148
-
6149
- gl.glEnd();
6150
- }
6151
- }
6125
+
6126
+ display.DrawGeometry(bRep, flipV, selectmode);
61526127 } else // catch (Error e)
61536128 {
61546129 // TRIANGLE ARRAY
61556130 if (IsOpaque()) // Static())
61566131 {
6157
- gl.glBegin(gl.GL_TRIANGLES);
6132
+ display.StartTriangles();
61586133 int facecount = bRep.FaceCount();
61596134 for (int i = 0; i < facecount; i++)
61606135 {
....@@ -6219,7 +6194,7 @@
62196194
62206195 display.DrawFace(this, p, q, r, face);
62216196 }
6222
- gl.glEnd();
6197
+ display.EndTriangles();
62236198 }
62246199 else
62256200 {
....@@ -6248,8 +6223,8 @@
62486223 //System.out.println("SORT");
62496224
62506225 java.util.Arrays.sort(facescompare);
6251
-
6252
- gl.glBegin(gl.GL_TRIANGLES);
6226
+
6227
+ display.StartTriangles();
62536228 for (int i = 0; i < facecount; i++)
62546229 {
62556230 Face face = bRep.GetFace(facescompare[i].index);
....@@ -6263,11 +6238,12 @@
62636238
62646239 display.DrawFace(this, p, q, r, face);
62656240 }
6266
- gl.glEnd();
6241
+ display.EndTriangles();
62676242 }
62686243
62696244 if (false) // live && support != null && support.bRep != null) // debug weights
62706245 {
6246
+ /*
62716247 gl.glDisable(gl.GL_LIGHTING);
62726248 float[] colorV = new float[3];
62736249
....@@ -6346,6 +6322,7 @@
63466322 // gl.glEnd();
63476323 }
63486324 }
6325
+ */
63496326 }
63506327 }
63516328
....@@ -6390,7 +6367,7 @@
63906367 center.add(r);
63916368 center.mul(1.0/3);
63926369
6393
- center.sub(CameraPane.theRenderer.eyeCamera.location);
6370
+ center.sub(Globals.theRenderer.EyeCamera().location);
63946371
63956372 distance = center.dot(center);
63966373 }
....@@ -6404,22 +6381,6 @@
64046381 void Print(Vertex v)
64056382 {
64066383 //System.err.println("(" + v.x + ", " + v.y + ", " + v.z + ")");
6407
- }
6408
-
6409
- void drawVertex(javax.media.opengl.GL gl, Vertex pv, boolean selectmode)
6410
- {
6411
- if (!selectmode)
6412
- {
6413
- gl.glNormal3f((float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z);
6414
- gl.glColor4f(pv.AO, pv.AO, pv.AO, 1);
6415
-
6416
- if (flipV)
6417
- gl.glTexCoord2f((float) pv.s, 1-(float) pv.t);
6418
- else
6419
- gl.glTexCoord2f((float) pv.s, (float) pv.t);
6420
- }
6421
-
6422
- gl.glVertex3f((float) pv.x, (float) pv.y, (float) pv.z);
64236384 }
64246385
64256386 void drawSelf(ClickInfo info, int level, boolean select)
....@@ -6993,83 +6954,83 @@
69936954 int spotw = spot.x + spot.width;
69946955 int spoth = spot.y + spot.height;
69956956 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
6996
- if (CameraPane.Xmin > spot.x)
6997
- {
6998
- CameraPane.Xmin = spot.x;
6999
- }
7000
- if (CameraPane.Xmax < spotw)
7001
- {
7002
- CameraPane.Xmax = spotw;
7003
- }
7004
- if (CameraPane.Ymin > spot.y)
7005
- {
7006
- CameraPane.Ymin = spot.y;
7007
- }
7008
- if (CameraPane.Ymax < spoth)
7009
- {
7010
- CameraPane.Ymax = spoth;
7011
- }
6957
+// if (CameraPane.Xmin > spot.x)
6958
+// {
6959
+// CameraPane.Xmin = spot.x;
6960
+// }
6961
+// if (CameraPane.Xmax < spotw)
6962
+// {
6963
+// CameraPane.Xmax = spotw;
6964
+// }
6965
+// if (CameraPane.Ymin > spot.y)
6966
+// {
6967
+// CameraPane.Ymin = spot.y;
6968
+// }
6969
+// if (CameraPane.Ymax < spoth)
6970
+// {
6971
+// CameraPane.Ymax = spoth;
6972
+// }
70126973 spot.translate(32, 32);
70136974 spotw = spot.x + spot.width;
70146975 spoth = spot.y + spot.height;
70156976 info.g.setColor(Color.blue);
70166977 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7017
- if (CameraPane.Xmin > spot.x)
7018
- {
7019
- CameraPane.Xmin = spot.x;
7020
- }
7021
- if (CameraPane.Xmax < spotw)
7022
- {
7023
- CameraPane.Xmax = spotw;
7024
- }
7025
- if (CameraPane.Ymin > spot.y)
7026
- {
7027
- CameraPane.Ymin = spot.y;
7028
- }
7029
- if (CameraPane.Ymax < spoth)
7030
- {
7031
- CameraPane.Ymax = spoth;
7032
- }
7033
- info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7034
- info.g.drawLine(spotw, spoth, spotw - 15, spoth);
6978
+// if (CameraPane.Xmin > spot.x)
6979
+// {
6980
+// CameraPane.Xmin = spot.x;
6981
+// }
6982
+// if (CameraPane.Xmax < spotw)
6983
+// {
6984
+// CameraPane.Xmax = spotw;
6985
+// }
6986
+// if (CameraPane.Ymin > spot.y)
6987
+// {
6988
+// CameraPane.Ymin = spot.y;
6989
+// }
6990
+// if (CameraPane.Ymax < spoth)
6991
+// {
6992
+// CameraPane.Ymax = spoth;
6993
+// }
6994
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6995
+ //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
70356996 spot.translate(0, -32);
70366997 info.g.setColor(Color.green);
70376998 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7038
- if (CameraPane.Xmin > spot.x)
7039
- {
7040
- CameraPane.Xmin = spot.x;
7041
- }
7042
- if (CameraPane.Xmax < spotw)
7043
- {
7044
- CameraPane.Xmax = spotw;
7045
- }
7046
- if (CameraPane.Ymin > spot.y)
7047
- {
7048
- CameraPane.Ymin = spot.y;
7049
- }
7050
- if (CameraPane.Ymax < spoth)
7051
- {
7052
- CameraPane.Ymax = spoth;
7053
- }
6999
+// if (CameraPane.Xmin > spot.x)
7000
+// {
7001
+// CameraPane.Xmin = spot.x;
7002
+// }
7003
+// if (CameraPane.Xmax < spotw)
7004
+// {
7005
+// CameraPane.Xmax = spotw;
7006
+// }
7007
+// if (CameraPane.Ymin > spot.y)
7008
+// {
7009
+// CameraPane.Ymin = spot.y;
7010
+// }
7011
+// if (CameraPane.Ymax < spoth)
7012
+// {
7013
+// CameraPane.Ymax = spoth;
7014
+// }
70547015 info.g.drawArc(boundary.x, boundary.y,
70557016 boundary.width, boundary.height, 0, 360);
70567017 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
7057
- if (CameraPane.Xmin > boundary.x)
7058
- {
7059
- CameraPane.Xmin = boundary.x;
7060
- }
7061
- if (CameraPane.Xmax < boundary.x + boundary.width)
7062
- {
7063
- CameraPane.Xmax = boundary.x + boundary.width;
7064
- }
7065
- if (CameraPane.Ymin > boundary.y)
7066
- {
7067
- CameraPane.Ymin = boundary.y;
7068
- }
7069
- if (CameraPane.Ymax < boundary.y + boundary.height)
7070
- {
7071
- CameraPane.Ymax = boundary.y + boundary.height;
7072
- }
7018
+// if (CameraPane.Xmin > boundary.x)
7019
+// {
7020
+// CameraPane.Xmin = boundary.x;
7021
+// }
7022
+// if (CameraPane.Xmax < boundary.x + boundary.width)
7023
+// {
7024
+// CameraPane.Xmax = boundary.x + boundary.width;
7025
+// }
7026
+// if (CameraPane.Ymin > boundary.y)
7027
+// {
7028
+// CameraPane.Ymin = boundary.y;
7029
+// }
7030
+// if (CameraPane.Ymax < boundary.y + boundary.height)
7031
+// {
7032
+// CameraPane.Ymax = boundary.y + boundary.height;
7033
+// }
70737034 return;
70747035 }
70757036 }
....@@ -7086,7 +7047,7 @@
70867047 startX = info.x;
70877048 startY = info.y;
70887049
7089
- hitSomething = 0;
7050
+ hitSomething = -1;
70907051 cVector origin = new cVector();
70917052 //LA.xformPos(origin, toParent, origin);
70927053 Rectangle spot = new Rectangle();
....@@ -7119,7 +7080,7 @@
71197080 }
71207081
71217082 //System.out.println("info.modifiers = " + info.modifiers);
7122
- modified = (info.modifiers & CameraPane.META) != 0;
7083
+ modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
71237084 //System.out.println("modified = " + modified);
71247085 //new Exception().printStackTrace();
71257086 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7147,7 +7108,7 @@
71477108 return true;
71487109 }
71497110
7150
- void doEditDrag0(ClickInfo info)
7111
+ void doEditDrag0(ClickInfo info, boolean opposite)
71517112 {
71527113 if (hitSomething == 0)
71537114 {
....@@ -7162,6 +7123,7 @@
71627123 //System.out.println("hitSomething = " + hitSomething);
71637124
71647125 double scale = 0.005f * info.camera.Distance();
7126
+
71657127 cVector xlate = new cVector();
71667128 //cVector xlate2 = new cVector();
71677129 switch (hitSomething)
....@@ -7172,9 +7134,9 @@
71727134
71737135 case hitCenter: // Translate
71747136
7175
- scale *= 0.05f * info.pane.theRenderer.renderCamera.Distance();
7137
+ scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
71767138
7177
- if (modified)
7139
+ if (modified || opposite)
71787140 {
71797141 //assert(false);
71807142 /*
....@@ -7220,10 +7182,10 @@
72207182 }
72217183 LA.xformDir(up, ClickInfo.matbuffer, up);
72227184 // if (!CameraPane.LOCALTRANSFORM)
7223
- LA.xformDir(up, info.pane.theRenderer.renderCamera.toScreen, up);
7185
+ LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
72247186 LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
72257187 // if (!CameraPane.LOCALTRANSFORM)
7226
- LA.xformDir(away, info.pane.theRenderer.renderCamera.toScreen, away);
7188
+ LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
72277189 //LA.vecCross(up, cVector.Z, right2);
72287190
72297191 cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
....@@ -7268,6 +7230,7 @@
72687230
72697231 if (modified)
72707232 {
7233
+ // Rotate 90 degrees
72717234 angle /= (Math.PI / 4);
72727235 angle = Math.floor(angle + 0.5);
72737236 angle *= (Math.PI / 4);
....@@ -7281,7 +7244,7 @@
72817244 }
72827245 /**/
72837246
7284
- switch (info.pane.renderCamera.viewCode)
7247
+ switch (info.pane.RenderCamera().viewCode)
72857248 {
72867249 case 1: // '\001'
72877250 LA.matZRotate(toParent, angle);
....@@ -7309,24 +7272,27 @@
73097272
73107273 case hitScale: // scale
73117274 double hScale = (double) (info.x - centerPt.x) / 32;
7275
+ double sign = 1;
7276
+ if (hScale < 0)
7277
+ {
7278
+ sign = -1;
7279
+ }
7280
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
73127281 if (hScale < 0.01)
73137282 {
7314
- hScale = 0.01;
7283
+ //hScale = 0.01;
73157284 }
7316
- hScale = Math.pow(hScale, scale * 50);
7317
- if (hScale < 0.01)
7318
- {
7319
- hScale = 0.01;
7320
- }
7285
+
73217286 double vScale = (double) (info.y - centerPt.y) / 32;
7322
- if (vScale < 0.01)
7287
+ sign = 1;
7288
+ if (vScale < 0)
73237289 {
7324
- vScale = 0.01;
7290
+ sign = -1;
73257291 }
7326
- vScale = Math.pow(vScale, scale * 50);
7292
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
73277293 if (vScale < 0.01)
73287294 {
7329
- vScale = 0.01;
7295
+ //vScale = 0.01;
73307296 }
73317297 LA.matCopy(startMat, toParent);
73327298 /**/
....@@ -7337,17 +7303,24 @@
73377303 }
73387304 /**/
73397305
7340
- switch (info.pane.renderCamera.viewCode)
7306
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7307
+
7308
+ if (totalScale < 0.01)
7309
+ {
7310
+ totalScale = 0.01;
7311
+ }
7312
+
7313
+ switch (info.pane.RenderCamera().viewCode)
73417314 {
73427315 case 3: // '\001'
73437316 if (modified)
73447317 {
73457318 //LA.matScale(toParent, 1, hScale, vScale);
7346
- LA.matScale(toParent, vScale, 1, 1);
7319
+ LA.matScale(toParent, totalScale, 1, 1);
73477320 } // vScale, 1);
73487321 else
73497322 {
7350
- LA.matScale(toParent, vScale, vScale, vScale);
7323
+ LA.matScale(toParent, totalScale, totalScale, totalScale);
73517324 } // vScale, 1);
73527325 break;
73537326
....@@ -7355,10 +7328,10 @@
73557328 if (modified)
73567329 {
73577330 //LA.matScale(toParent, hScale, 1, vScale);
7358
- LA.matScale(toParent, 1, vScale, 1);
7331
+ LA.matScale(toParent, 1, totalScale, 1);
73597332 } else
73607333 {
7361
- LA.matScale(toParent, vScale, 1, vScale);
7334
+ LA.matScale(toParent, totalScale, 1, totalScale);
73627335 }
73637336 break;
73647337
....@@ -7366,10 +7339,10 @@
73667339 if (modified)
73677340 {
73687341 //LA.matScale(toParent, hScale, vScale, 1);
7369
- LA.matScale(toParent, 1, 1, vScale);
7342
+ LA.matScale(toParent, 1, 1, totalScale);
73707343 } else
73717344 {
7372
- LA.matScale(toParent, vScale, vScale, 1);
7345
+ LA.matScale(toParent, totalScale, totalScale, 1);
73737346 }
73747347 break;
73757348 }
....@@ -7502,14 +7475,22 @@
75027475 //return super.toString() + " (id=" + list + ")" + " (brep=" + bRep + ")";
75037476 //return name + " (id=" + list + ")" + " (brep=" + bRep + ") " + super.toString();
75047477 //return name + " (#tri = " + (bRep==null?0:bRep.VertexCount()) + ") " + super.toString();
7478
+
7479
+ String objname;
7480
+
75057481 if (false) //parent != null)
75067482 {
7507
- return name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")";
7483
+ objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")";
75087484 } else
75097485 {
7510
- return GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ") ")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ +System.identityHashCode(this);
7486
+ objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count - 1) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ "";
75117487 } // + super.toString();
75127488 //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName();
7489
+
7490
+ if (!Globals.ADVANCED)
7491
+ return objname;
7492
+
7493
+ return objname + " " + System.identityHashCode(this);
75137494 }
75147495
75157496 public int hashCode()
....@@ -7565,6 +7546,7 @@
75657546 objectUI.closeUI();
75667547 if (editWindow != null)
75677548 {
7549
+ editWindow.ctrlPanel.FlushUI();
75687550 editWindow.refreshContents();
75697551 } // ? new
75707552 objectUI = null;
....@@ -7700,7 +7682,7 @@
77007682 {
77017683 assert(bRep != null);
77027684 if (!(support instanceof GenericJoint)) // support.bRep != null)
7703
- GrafreeD.Assert(support.bRep == bRep.support);
7685
+ Grafreed.Assert(support.bRep == bRep.support);
77047686 }
77057687 else
77067688 {
....@@ -7749,9 +7731,9 @@
77497731 private static cVector edge2 = new cVector();
77507732 //private static cVector norm = new cVector();
77517733 /*transient private*/ int hitSomething;
7752
- private static final int hitCenter = 1;
7753
- private static final int hitScale = 2;
7754
- private static final int hitRotate = 3;
7734
+ static final int hitCenter = 1;
7735
+ static final int hitScale = 2;
7736
+ static final int hitRotate = 3;
77557737 /*transient*/ /*private*/ int viewCode; // Now used for transparency cache flag
77567738 /*transient*/ private Point centerPt;
77577739 /*transient*/ private int startX;