From ab9e1281ca1ccb3e5d01eb24934f81c1072114f2 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Thu, 12 Sep 2019 21:14:10 -0400 Subject: [PATCH] Four new presets + sort option. --- Object3D.java | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Object3D.java b/Object3D.java index 3a1cb6e..f36024d 100644 --- a/Object3D.java +++ b/Object3D.java @@ -140,7 +140,7 @@ projectedVertices[i] = new cVector2(); // Others } projectedVertices[0].x = 100; // bump - projectedVertices[1].y = 5000; // punchthrough. only for png + projectedVertices[1].y = 1000; // punchthrough. only for png } void MinMax(cVector minima, cVector maxima) @@ -641,6 +641,9 @@ boolean random = false; boolean speedup = false; boolean rewind = false; + + // Option to sort triangles, e.g. for transparency. + boolean sort = false; float NORMALPUSH = 0; @@ -1213,24 +1216,28 @@ { // return true; - if (material == null || material.multiply) - return true; +// if (material == null || material.multiply) +// return true; +// +// if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) +// return false; +// +// // Transparent objects are dynamic because we have to sort the triangles. +// return material.opacity > 0.99; - if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) - return false; - - // Transparent objects are dynamic because we have to sort the triangles. - return material.opacity > 0.99; + return !sort; } boolean IsOpaque() { // return true; - if (material == null || material.multiply) - return true; +// if (material == null || material.multiply) +// return true; +// +// return material.opacity > 0.99; - return material.opacity > 0.99; + return !sort; } Object3D() @@ -6307,8 +6314,8 @@ Globals.lighttouched = true; // all panes... } - touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false; - //touched = false; + //touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false; + touched = false; if (this instanceof Texture || this instanceof TextureNode) { @@ -6455,6 +6462,7 @@ boolean failedPigment = false; boolean failedBump = false; + CameraPane.lastObject = this; try { display.BindPigmentTexture(tex, texres); -- Gitblit v1.6.2