Constructors
Node2List
#public Node2List()
Properties
Indexers
Methods
Append
#Add a single node to this list. This will reset all sorting flags and caches.
Parameters:
| node (Node2) | Node to add |
AppendRange
#Add a range of nodes to this list. This will reset all sorting flags and caches.
Parameters:
| nodes (IEnumerable<Node2>) | Nodes to add |
CreateTree
#Create a VorNodeTree that contains all the Nodes in this list.
ExpireSequence
#public void ExpireSequence()
Call this method when you made a change that potentially invalidates the sorting flags and caches.
GetEnumerator
#GetEnumerator1
#Insert
#Insert a single node into this list. This will reset all sorting flags and caches.
InsertRange
#Insert a range of nodes into this list. This will reset all sorting flags and caches.
Parameters:
| index (int) | Index at which insertion begins |
| nodes (IEnumerable<Node2>) | Nodes to add |
JitterNodes
#Randomly mutate all node locations
Parameters:
| amount (double) | Maximum distance to move in x and y directions. |
NearestNodes
#Perform a brute force node search for the N nearest nodes in the set.
Parameters:
| x (double) | X coordinate of search start. |
| y (double) | Y coordinate of search start. |
| N (int) | |
| min_dist_squared (double = -1.7976931348623157E+308) | Minimum distance threshold, use any negative value to ignore this setting. |
| max_dist_squared (double = 1.7976931348623157E+308) | Maximum distance threshold. |
Returns: The N (or fewer) results, sorted by ascending distance.
Remove
#Remove a single node from this list. Sorting flags are maintained but caches are destroyed.
Parameters:
| node (Node2) | Node to remove. |
Returns: True on success, false if the provided Node does not occur in this list.
RemoveAt
#Remove the node at the specified index. Sorting flags are maintained but caches are destroyed.
Parameters:
| index (int) | Index of node to remove |
RenumberNodes
#public void RenumberNodes()
Reset all indices of all nodes by renumbering them in their current order. Nulls are ignored but they do affect the numbering.
Sort
#public void Sort(NodeListSort type)
Sort the list using a sorting type.
Parameters:
| type (Node2List.NodeListSort) | Type of sorting algorithm. |