Hello all, here once again with some simple questions:
a) I'm using SimpleGame as a base for my app (don't need anything particularly fancy at this point), and so SpatialTransformers for my animations. I've noticed that the more objects a ST controls (the higher numObjects is), the faster it runs. As an example, say this were a part of my code:
SpatialTransformer st1 = new SpatialTransformer(1);
SpatialTransformer st2 = new SpatialTransformer(2);
/*initialize three boxes*/
st1.setObject(box1, 0, -1);
st2.setObject(box2, 0, -1);
st2.setObject(box3, 1, -1);
st1.setPosition(0, 10, new Vector3f(10, 0, 0));
st2.setPosition(0, 10, new Vector3f(10, 0, 0));
st2.setPosition(1, 10, new Vector3f(10, 0, 0));
In the above code, the two boxes controlled by st2 will reach the destination in half the time it takes box1 to reach there. I've added lines like
st1.setSpeed(1/st1.getNumObjects());
b) At the moment, I have several SpatialTransformers that each control a type of spatial (the animations for the different types are different, but all STs start, stop, and pause at the same time). In the interest of optimization (running time and memory usage, not ease of writing), is it better to create one lage ST that oversees everything in the animation, or is it okay to have many smaller STs controlling the parts of the animation?
c) Related to b), how "expensive" is a call to interpolateMissing()?
Sorry to bother y'all with so many questions. Thank you for reading and have a good day.
-Kal