Skeletal Man

New Mesh System Implemented.

The old Mesh system was working, but it was crap. It required you to calculate all kinds of rotations for each joint that you wanted to add to the skeleton. Making the simple head below would have been a huge pain. The new Mesh system takes absolute coords relative to the BaseJoint and converts them into these rotations also relative to the BaseJoint. A MeshBaseJoint is connected between every set of MeshJoints and their Joint. The MeshBaseJoint reverses the default rotations of the skeleton before drawing the MeshJoints. This is easier to explain in an example.

BaseJoint
Joint->DoRot()
Joint->DoRot()
Joint->DoRot()
MeshBaseJoint->ReverseDefaultRotations()
Mesh->DoRot()
Mesh->Draw()

In the above example, if the Joint's haven't rotated, then the Mesh will draw exactly where it's absolute coords were given. If any of the Joints have rotated, that rotation will propagate through the Reversal of the Default Rotations and will correctly affect the Mesh->Draw()

I also implemented a system for connecting the dots, so to speak. MeshPrimative holds a type of OpenGL primative and a vector of MeshJoint ID's in the correct order that they are to be fed to

glBegin(GL_PRIMATIVE);
glVertex(First Mesh Coords);
...
glVertex(Last Mesh Coords);
glEnd();

That's it for now, maybe I'll put some textures on it next week...

Controls:
movement - same as usual
i - increments time
r - resets time