Example #1
0
 protected override void InsertItem(int index, Node item)
 {
     base.InsertItem(index, item);
     if (_SpatialTree != null)
     {
         _SpatialTree.Add(item);
     }
 }
Example #2
0
 /// <summary>
 /// Generate a node at this vertex, if it does not already posess one.
 /// This override can be used to generate nodes independent of a full model/element system.
 /// </summary>
 /// <param name="options"></param>
 public void GenerateNode(NodeGenerationParameters options, NodeCollection nodes, NodeDDTree nodeTree)
 {
     if (Node == null)
     {
         Node = nodeTree.NearestTo(Position, options.ConnectionTolerance);
         if (Node == null)
         {
             Node = new Node(Position);
         }
     }
     if (!nodes.Contains(Node.GUID))
     {
         nodes.Add(Node);
         nodeTree.Add(Node);
     }
 }