www.jpct.net

jPCT - a 3d engine for Java => Bugs => Topic started by: raft on December 28, 2011, 12:25:39 PM

Title: creating Object3D with no indices
Post by: raft on December 28, 2011, 12:25:39 PM
this call
new Object3D(new float[12], null, null, -1);

throws a
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
at com.threed.jpct.Object3D.<init>(Unknown Source)


I guess this is a bug
Title: Re: creating Object3D with no indices
Post by: raft on December 28, 2011, 01:12:14 PM
i guess not. coordinate array should be a multiple of 9.

so this works:
new Object3D(new float[9], null, null, -1);
Title: Re: creating Object3D with no indices
Post by: EgonOlsen on December 28, 2011, 07:43:03 PM
Yes...but i'll add some code that makes the engine fail more gracefully... ;)