I am trying to write a 2D Bone system in XNA.
My initial thought was to use matrices to track turns and position through a bone tree so that elements can be easily displayed.
Cool, I thought, and then horror hit me in the face when I saw that matrices can only be applied to a single instance of a .Begin sprite, not to a call to call!
I checked some performance tests to see if I had any horror, and this caused spritebatch.Begin and End when the number of frames dropped by my frame rate in a huge (and unacceptable) amount.
So, before I draw a single image of the bones, I will need to manually create its final position and rotation (and, possibly, the scale in the future). In this case, would you still use matrices and somehow extract the information at the end before you draw the bone? If so, what ideas on how do I get the final information I need? Or would it be easier to try to build all of this from the original positions and rotations of its parent nodes?
Thanks in advance to everyone who has ideas.
source share