Ejemplo n.º 1
0
 /// <summary>
 /// Add a child to this Scene.
 /// </summary>
 /// <param name="node">Node to add</param>
 public new void Add(Node node)
 {
     if (node is Model)
     {
         if (model == null)
         {
             model = node as Model;
             model.Parent = this;
         }
     }
     else
     {
         base.Add(node);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Construct a new Node
 /// </summary>
 public Node()
 {
     Visible = true;
     parent = null;
     children = new List<Node>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Add a child to this Node.
 /// </summary>
 /// <param name="node">Node to add</param>
 public void Add(Node node)
 {
     children.Add(node);
     node.Parent = this;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Remove a child from this Node.
 /// </summary>
 /// <param name="node">Node to remove</param>
 /// <returns>Removed Node</returns>
 public Node Remove(Node node)
 {
     node.Parent = null;
     children.Remove(node);
     return node;
 }