Author Topic: creating Object3D with no indices  (Read 5287 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
creating Object3D with no indices
« 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

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: creating Object3D with no indices
« Reply #1 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);

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: creating Object3D with no indices
« Reply #2 on: December 28, 2011, 07:43:03 pm »
Yes...but i'll add some code that makes the engine fail more gracefully... ;)