Normand Briere
2019-06-17 26b49d8e26625491f4a407a05e9bc9d72037f938
Object3D.java
....@@ -174,7 +174,7 @@
174174 {
175175 Object3D o = hashtable.get(GetUUID());
176176
177
- assert(this.bRep == o.bRep);
177
+ Grafreed.Assert(this.bRep == o.bRep);
178178 if (this.bRep != null)
179179 assert(this.bRep.support == o.transientrep);
180180
....@@ -563,12 +563,14 @@
563563 toParent = LA.newMatrix();
564564 fromParent = LA.newMatrix();
565565 }
566
+
566567 if (toParentMarked == null)
567568 {
568569 if (maxcount != 1)
569570 {
570571 new Exception().printStackTrace();
571572 }
573
+
572574 toParentMarked = LA.newMatrix();
573575 fromParentMarked = LA.newMatrix();
574576 }
....@@ -5572,12 +5574,23 @@
55725574 boolean NeedSupport()
55735575 {
55745576 return
5575
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5577
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55765578 // PROBLEM with CROWD!!
55775579 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55785580 }
55795581
55805582 static boolean DEBUG_SELECTION = false;
5583
+
5584
+ boolean IsLive()
5585
+ {
5586
+ if (live)
5587
+ return true;
5588
+
5589
+ if (parent == null)
5590
+ return false;
5591
+
5592
+ return parent.IsLive();
5593
+ }
55815594
55825595 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55835596 {
....@@ -5640,7 +5653,7 @@
56405653 support = support;
56415654
56425655 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5643
- boolean usecalllists = false; // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5656
+ boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
56445657
56455658 if (!usecalllists && bRep != null && bRep.displaylist > 0)
56465659 {
....@@ -5660,10 +5673,12 @@
56605673 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
56615674
56625675 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5663
- (touched || (bRep != null && bRep.displaylist <= 0)))
5676
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5677
+ (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
56645678 {
56655679 Globals.lighttouched = true;
56665680 } // all panes...
5681
+
56675682 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56685683 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56695684 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -7089,7 +7104,7 @@
70897104 spot.translate(32, 32);
70907105 spotw = spot.x + spot.width;
70917106 spoth = spot.y + spot.height;
7092
- info.g.setColor(Color.blue);
7107
+ info.g.setColor(Color.cyan);
70937108 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70947109 // if (CameraPane.Xmin > spot.x)
70957110 // {
....@@ -7107,11 +7122,12 @@
71077122 // {
71087123 // CameraPane.Ymax = spoth;
71097124 // }
7110
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7111
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7125
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7126
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
71127127 spot.translate(0, -32);
7113
- info.g.setColor(Color.green);
7128
+ info.g.setColor(Color.yellow);
71147129 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7130
+ info.g.setColor(Color.green);
71157131 // if (CameraPane.Xmin > spot.x)
71167132 // {
71177133 // CameraPane.Xmin = spot.x;
....@@ -7429,19 +7445,20 @@
74297445 switch (info.pane.RenderCamera().viewCode)
74307446 {
74317447 case 3: // '\001'
7432
- if (modified)
7448
+ if (modified || opposite)
74337449 {
74347450 //LA.matScale(toParent, 1, hScale, vScale);
74357451 LA.matScale(toParent, totalScale, 1, 1);
74367452 } // vScale, 1);
74377453 else
74387454 {
7455
+ // EXCEPTION!
74397456 LA.matScale(toParent, totalScale, totalScale, totalScale);
74407457 } // vScale, 1);
74417458 break;
74427459
74437460 case 2: // '\002'
7444
- if (modified)
7461
+ if (modified || opposite)
74457462 {
74467463 //LA.matScale(toParent, hScale, 1, vScale);
74477464 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7452,7 +7469,7 @@
74527469 break;
74537470
74547471 case 1: // '\003'
7455
- if (modified)
7472
+ if (modified || opposite)
74567473 {
74577474 //LA.matScale(toParent, hScale, vScale, 1);
74587475 LA.matScale(toParent, 1, 1, totalScale);