Flying Donuts: 3D Animation in Avalon Made Easy (V3 of my 3D experiments)

3D is all well and good, but it gets really interesting when you can animate things.  It turns out that adding animation to 3D models in Avalon is extremely easy.  I modified my application (which bit by bit is turning into a 3D designer) so that you can create both translation and scale animations on the models.  Basically, it is a matter of creating a Vector3DAnimation class and then adding KeyFrame objects to the that collection, which specify vectors and times.  Then, you simply attach the Vector3DAnimation class the transform class.  In the case of the ScaleTransform3D, you attach it to the ScaleVectorAnimations collection.  In the case of the TranslateTransform3D, you add it to the OffsetAnimations collection.  You can of course add both scale and translate animations, so that your models scale and move at the same time.  Then, as usual, you add these to the Transform3DCollection and, wallah, before you know it donuts are flying all over, getting as large as you can grow them.

Download the code here.

One other thing I did was databind the list of KeyFrames to a listbox, which was super trivial to do. 

Again, I am completely blown away by the ease of programmability of Avalon 3D.