예제 #1
0
 /// <summary>
 /// adds a new child scene node
 /// the nodes parent property is set automatically
 /// </summary>
 /// <param name="node">node to add</param>
 /// <returns>the added node</returns>
 public ISceneNode Attach(ISceneNode node)
 {
     if (node.IsAttached())
     {
         throw new GraphicsException("Node is already attached to a root node! Detach first!");
     }
     if (nodes == null)
     {
         nodes = new SceneNodes();
     }
     nodes.Add(node);
     node.Parent  = this;
     node.Manager = Manager;
     return(node);
 }