Can anyone see how this frustum code can cause the following exception?
java.lang.ArrayIndexOutOfBoundsException
at com.ryanm.droid.rugl.util.geom.Frustum.extractFromOGL(Frustum.java:180)
...
The offending line 180:
frustum[ 3 ][ 0 ] /= t;
The declaration of the frustum arrays:
private final float[][] frustum = new float[ 6 ][ 4 ];
The only instances of “new” in that file are the 4 at the start, so there’s no way that the arrays are being changed after construction.
To put it mildly: ???
I’ve had 5 reports of this from 3 different users. The only possible explanation that I can see someone out there has taken my (freely available) code, b0rked it, and is distributing broken apks.
Does anyone have an alternative?