diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java index da67bdddb94b98b871b2e910ff51e6a009180627..35a9793b928692a1774888f34bf378874c754e48 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java @@ -10,6 +10,7 @@ import cz.fidentis.analyst.gui.scene.DrawableMesh; import cz.fidentis.analyst.visitors.mesh.BoundingBox; import java.awt.Color; import java.util.ArrayList; +import java.util.Collections; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java index eeede157e4211f17e8e1a14bdf0d5ddcefdb871d..2049549b0eae1f3d5ff1374d08411bdb9a304400 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java @@ -11,6 +11,7 @@ import cz.fidentis.analyst.mesh.core.MeshFacet; import java.awt.Color; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import javax.vecmath.Point3d; import javax.vecmath.Point4f; @@ -133,6 +134,10 @@ public class SceneRenderer { gl.glPolygonMode( GL_FRONT_AND_BACK, GL_FILL); } + if (((DrawableMesh)drawables.toArray()[0]).getTransparency() != 1) { + Collections.reverse((ArrayList)drawables); + } + for (DrawableMesh obj: drawables) { // render color Color color = obj.getColor(); @@ -140,7 +145,6 @@ public class SceneRenderer { color.getBlue() / 255d , obj.getTransparency()); for (MeshFacet facet: obj.getFacets()) { - // TO DO - R. Pajersky: add transformation (glPushMatrix, glRotate, ...) // rotate gl.glPushMatrix(); gl.glRotated(obj.getRotation().x, 1, 0, 0);