Esempio 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);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Construct a new Node
 /// </summary>
 public Node()
 {
     Visible = true;
     parent = null;
     children = new List<Node>();
 }
Esempio 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;
 }
Esempio 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;
 }