Main repository of MikuMikuStudio
Revision | 3a474a39d3fc0b446c2322a5e827c4d3ca02f038 (tree) |
---|---|
Time | 2013-05-13 20:56:22 |
Author | Kaelthas_Spellsinger@o2.pl <Kaelthas_Spellsinger@o2.p...> |
Commiter | Kaelthas_Spellsinger@o2.pl |
Bugfix: fixes to strip box indices and normals computation.
git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10612 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -46,18 +46,18 @@ import java.nio.FloatBuffer; | ||
46 | 46 | public class StripBox extends AbstractBox { |
47 | 47 | |
48 | 48 | private static final short[] GEOMETRY_INDICES_DATA = |
49 | - { 1, 0, 4, | |
50 | - 5, | |
51 | - 7, | |
52 | - 0, | |
53 | - 3, | |
54 | - 1, | |
55 | - 2, | |
56 | - 4, | |
57 | - 6, | |
58 | - 7, | |
59 | - 2, | |
60 | - 3 }; | |
49 | + { 0, 1, 4, | |
50 | + 2, | |
51 | + 6, | |
52 | + 7, | |
53 | + 4, | |
54 | + 5, | |
55 | + 0, | |
56 | + 7, | |
57 | + 3, | |
58 | + 2, | |
59 | + 0, | |
60 | + 1}; | |
61 | 61 | |
62 | 62 | private static final float[] GEOMETRY_TEXTURE_DATA = { |
63 | 63 | 1, 0, |
@@ -155,8 +155,8 @@ public class StripBox extends AbstractBox { | ||
155 | 155 | norm.set(vert[i]).normalizeLocal(); |
156 | 156 | |
157 | 157 | normals[i * 3 + 0] = norm.x; |
158 | - normals[i * 3 + 1] = norm.x; | |
159 | - normals[i * 3 + 2] = norm.x; | |
158 | + normals[i * 3 + 1] = norm.y; | |
159 | + normals[i * 3 + 2] = norm.z; | |
160 | 160 | } |
161 | 161 | |
162 | 162 | setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals)); |