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
This commit is contained in:
parent
27c5b3cfb0
commit
263089b68f
@ -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…
x
Reference in New Issue
Block a user