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
3.0
Kae..pl 13 years ago
parent 27c5b3cfb0
commit 263089b68f
  1. 4
      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<Float, Map<Float, Integer[]>> lowestAnglesUVCoordinatesMap = new HashMap<Float, Map<Float,Integer[]>>();
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

Loading…
Cancel
Save