Bugfix: fixes to strip box indices and normals computation.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10612 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 12 years ago
parent 217a1a6273
commit 7610bfb7aa
  1. 20
      engine/src/core/com/jme3/scene/shape/StripBox.java

@ -46,18 +46,18 @@ import java.nio.FloatBuffer;
public class StripBox extends AbstractBox { public class StripBox extends AbstractBox {
private static final short[] GEOMETRY_INDICES_DATA = private static final short[] GEOMETRY_INDICES_DATA =
{ 1, 0, 4, { 0, 1, 4,
5,
7,
0,
3,
1,
2, 2,
4,
6, 6,
7, 7,
4,
5,
0,
7,
3,
2, 2,
3 }; 0,
1};
private static final float[] GEOMETRY_TEXTURE_DATA = { private static final float[] GEOMETRY_TEXTURE_DATA = {
1, 0, 1, 0,
@ -155,8 +155,8 @@ public class StripBox extends AbstractBox {
norm.set(vert[i]).normalizeLocal(); norm.set(vert[i]).normalizeLocal();
normals[i * 3 + 0] = norm.x; normals[i * 3 + 0] = norm.x;
normals[i * 3 + 1] = norm.x; normals[i * 3 + 1] = norm.y;
normals[i * 3 + 2] = norm.x; normals[i * 3 + 2] = norm.z;
} }
setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals)); setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));

Loading…
Cancel
Save