[commited] programmatically creating mesh-animations with face-anim-demo

Hola, I just had a look into Ogre's mesh-animations. It works quite good as long as you import it from a .mesh.xml-file.



But if you want to create a MeshAnimation in java it is getting complicated. Poses were only assigned to MeshAnimations so it was acutally only possible to access them by a PoseAnimation. If you didn't had any the poses were lost.



Therefore I made some changes with an additional class (MeshAnimationWrapper) which gives you the ability to create KeyFrames for certain poses at a specified time.



BTW: I actually wanted to create something like Ogre3d's facial-animation-sample and a demo is added as well

It would be nice to get some feedback, about what works and what not.



I will wait quite a time until I commit this as it is quite a sensible region in the code.



I will attach the patch and a test as file.




Ah I have to mention that I used swt for the GUI and did that quick and very dirty.

So somehow the event-dispatch is not working properly. From time to time you have

press several times on the slider in order to change the mesh (just dragging didn't

work neither…but I think for showing it is enough)



Here a screenshot:

Ok,…it is commited.



I added a Test in jmetest.ogrexml which will demonstrate how to use

attached poses programatically like this:



// There values are (pose,time for keyframe, weight of pose):
      manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 2f,0);
      manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 4f,1);
      manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 4.5f,1);
      manualAnimationWrapper.addPoseKeyFrame("MouthOpen", 5f,0);



It also demonstrates how to combine both skeletal and meshanimation with
that wonderful AnimationChannels.

PS: I realized that I still have to implements savable for new data.... <--

Looks great!