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
Code: [Select]
new Object3D(new float[12], null, null, -1);
throws a
Code: [Select]
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:
Code: [Select]
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... ;)