Normand Briere
2019-09-13 ab9e1281ca1ccb3e5d01eb24934f81c1072114f2
Object3D.java
....@@ -140,7 +140,7 @@
140140 projectedVertices[i] = new cVector2(); // Others
141141 }
142142 projectedVertices[0].x = 100; // bump
143
- projectedVertices[1].y = 5000; // punchthrough. only for png
143
+ projectedVertices[1].y = 1000; // punchthrough. only for png
144144 }
145145
146146 void MinMax(cVector minima, cVector maxima)
....@@ -641,6 +641,9 @@
641641 boolean random = false;
642642 boolean speedup = false;
643643 boolean rewind = false;
644
+
645
+ // Option to sort triangles, e.g. for transparency.
646
+ boolean sort = false;
644647
645648 float NORMALPUSH = 0;
646649
....@@ -1213,24 +1216,28 @@
12131216 {
12141217 // return true;
12151218
1216
- if (material == null || material.multiply)
1217
- return true;
1219
+// if (material == null || material.multiply)
1220
+// return true;
1221
+//
1222
+// if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1223
+// return false;
1224
+//
1225
+// // Transparent objects are dynamic because we have to sort the triangles.
1226
+// return material.opacity > 0.99;
12181227
1219
- if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1220
- return false;
1221
-
1222
- // Transparent objects are dynamic because we have to sort the triangles.
1223
- return material.opacity > 0.99;
1228
+ return !sort;
12241229 }
12251230
12261231 boolean IsOpaque()
12271232 {
12281233 // return true;
12291234
1230
- if (material == null || material.multiply)
1231
- return true;
1235
+// if (material == null || material.multiply)
1236
+// return true;
1237
+//
1238
+// return material.opacity > 0.99;
12321239
1233
- return material.opacity > 0.99;
1240
+ return !sort;
12341241 }
12351242
12361243 Object3D()
....@@ -6307,8 +6314,8 @@
63076314 Globals.lighttouched = true; // all panes...
63086315 }
63096316
6310
- touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false;
6311
- //touched = false;
6317
+ //touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false;
6318
+ touched = false;
63126319
63136320 if (this instanceof Texture || this instanceof TextureNode)
63146321 {
....@@ -6455,6 +6462,7 @@
64556462 boolean failedPigment = false;
64566463 boolean failedBump = false;
64576464
6465
+ CameraPane.lastObject = this;
64586466 try
64596467 {
64606468 display.BindPigmentTexture(tex, texres);