public void ShareCloneChildren(DefaultSceneNode n)
 {
     foreach (var child in children)
     {
         ITimeDependent cha = child as ITimeDependent;
         n.InsertChild((cha == null) ? child : (ISceneNode)cha.Clone(), child.ToParent);
     }
 }
        public void ShareCloneAttributes(DefaultSceneNode n)
        {
            if (attributes == null ||
                attributes.Count == 0)
            {
                n.attributes = null;
            }
            else
            {
                n.attributes = new Dictionary <string, object>();
                foreach (var kvp in attributes)
                {
                    ICloneable vala = kvp.Value as ICloneable;
                    n.attributes.Add(kvp.Key, (vala == null) ? kvp.Value : vala.Clone());
#if DEBUG
                    if (vala != null)
                    {
                        Util.Log("Clone Attribute: " + kvp.Key);
                    }
#endif
                }
            }
        }