Ok, now that I'm interpolating my animations, I have to loops through every vertice every frame and calculate it's new position. The biggest speed killer seems to be the looping. Here's what I have now:
An ArrayList<float[]> to hold each frame of the animation (and each float[] is a list of coordinates so that float[0]=x, float[1]=y, float[2]=z, loop ad infinitum). So, to loop through, I do this (note, pseudo code):
animationFrames = ArrayList<float[]>;
for (int i=0;i<animationFrames.get(currentFrame).length;i++) {
currentPoint = animationFrames.get(currentFrame)[i];
nextPoint = animationFrames.get(nextFrame)[i];
newpoint = (calculate interpolation of points);
currentGeometryFloatBuffer.put(newpoint);
}
My question is, is there a faster method to reference, store, and loop through these long lists of coordinates? Or am I doing it the most optimized way?