I haven't personally done any cloning with animations yet, so I'll leave that question to someone else who has. For the basic Object3D wrapped into a class, I use a simple infrastructure like this:
public class SuperObject3D
{
private Object3D basicObject3D = null;
// Other variables, properties, etc ..
public SuperObject3D( Object3D obj /*args for other properties*/ )
{
basicObject3D = obj;
// Set other variables, properties, etc ...
}
public SuperObject3D cloneObject()
{
return ( new SuperObject3D( basicObject3D.cloneObject() /*other args*/ ) );
}
}
And then I extend that for various subcategories of objects. I would think that you could use the same infrastructure for animations -- doesn't cloneObject() also clone the Object3D's animations as well?