StripGeometry - calculateFaceNormals - Broken?

I’m getting an IndexOutOfRange in the calculateFaceNormals of GeomContainer when I use TriangleStripArray.

Seems like the normal calculation routine things there are going to be more faces there actually are.?

Kev

Just realised how un-useful that post was :), heres a stack trace that came out:


java.lang.ArrayIndexOutOfBoundsException: 774
        at com.xith3d.scenegraph.GeomContainer.calculateFaceNormals(GeomContaine
r.java:370)
        at org.newdawn.xith3d.loaders.md2.MD2ModelInstance.interpolateAnim(MD2Mo
delInstance.java:232)
        at MD2Test.run(MD2Test.java:173)
        at java.lang.Thread.run(Thread.java:534)

faceSize is set to 2 for triangle strip arrays. The number of faces is caculated like this:

4 verts / 2 = 2 faces (yep)
5 verts / 2 = 2 faces (it’d be 3 faces wouldn’t it?)
6 verts / 2 = 3 faces (4 faces?)

Maybe I don’t understand what a Triangle Strip is properly. Actually, if you consider the index array the above isn’t going to be right, um… sorry was trying to be more help but appear to have made it more confusing.

Kev