www.jpct.net
jPCT - a 3d engine for Java => Bugs => Topic started by: raft on January 31, 2010, 04:47:48 am
-
any idea why this happens ?
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8
at com.threed.jpct.GenericVertexController.updateMesh(Unknown Source)
at com.threed.jpct.Mesh.applyVertexController(Unknown Source)
..
-
When does this happen? Do you have a test case?
-
found it i guess. it happens when an empty Object3D is created with new constructor:
Object3D object = new Object3D(new float[0], new float[0], new int[0], TextureManager.TEXTURE_NOTFOUND);
object.build();
object.getMesh().setVertexController(..);
object.getMesh().applyVertexController();
an empty object created with old constructor throws same exception with different index (1)
Object3D object = new Object3D(0);
hope this helps,
r a f t
-
I'll look into it. But what's the point of using an IVertexController on an empty object anyway?
-
But what's the point of using an IVertexController on an empty object anyway?
no point, the collada exporter just exported so..
-
Try this jar: http://www.jpct.net/download/beta/jpct.jar (http://www.jpct.net/download/beta/jpct.jar). The problem was, that the controller implementation didn't require that there is a bounding box but it assumed that at least the space for it is reserved, which isn't true to "empty" objects like these. I hope this is fixed now. This release also fixes the rotate?()-methods.
-
empty objects created with new constructor still throws same exception ;)
new Object3D(new float[0], new float[0], new int[0], TextureManager.TEXTURE_NOTFOUND);
-
Argh...my test case didn't call build(), which obviously makes a difference. I'll fix this tomorrow.
-
I've updated the jar. Please give it a try.
-
it seems ok now, thanks ;D