From 263089b68f98ad52c3ff31c3f4ce30a828be43c0 Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Thu, 25 Aug 2011 17:06:47 +0000 Subject: [PATCH] Fix to tube UV coordinates generation (image will not be upside down now). git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8089 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../scene/plugins/blender/textures/UVProjectionGenerator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/textures/UVProjectionGenerator.java b/engine/src/blender/com/jme3/scene/plugins/blender/textures/UVProjectionGenerator.java index aa2060c1a..3d860ff9d 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/textures/UVProjectionGenerator.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/textures/UVProjectionGenerator.java @@ -120,8 +120,6 @@ import com.jme3.scene.plugins.blender.textures.UVCoordinatesGenerator.BoundingTu float cx = bt.getCenter().x, cy = bt.getCenter().y; Vector3f uBase = new Vector3f(0, -1, 0); - //the key is the Z-ccordinate of the vertex and the value a map between the vertex's angle nad indexes of its UV-coordinates -// Map> lowestAnglesUVCoordinatesMap = new HashMap>(); float vBase = bt.getCenter().z - bt.getHeight() * 0.5f; for (int i = 0, j = 0; i < positions.limit(); i += 3, j += 2) { // calculating U @@ -135,7 +133,7 @@ import com.jme3.scene.plugins.blender.textures.UVCoordinatesGenerator.BoundingTu // calculating V float z = positions.get(i + 2); - uvCoordinates[j + 1] = (vBase - z) / bt.getHeight(); + uvCoordinates[j + 1] = (z - vBase) / bt.getHeight(); } //looking for splitted triangles