Property | Type | Description | |
---|---|---|---|
endNode | Node, |
Method | Description | |
---|---|---|
AddToDictionary ( Dictionary |
Given a dictionary that maps a Node to the list of Triangles that contain that Node on a side, add the value to the list of Triangles that the key currently maps to
|
|
GenerateGraph ( ) : System.Collections | ||
GetPairString ( Vector3 v1, Vector3 v2 ) : string |
Given two Vector3 objects, creates a string representation of that pair with the smaller Vector3 object coming first (ex: (1,2,3) and (4,5,6) will be respresented as "1,2,3 - 4,5,6" with the smaller Vector3 coming first)
|
|
Size ( ) : int | ||
ToString ( ) : string |
Returns a string representation of all the triangles of the nodes
|
|
ToStringWithNeighbors ( ) : string | ||
addNodeNeighbor ( Node>.Dictionary |
Adds a neighbor to a given Node. The value of the neighbor is constructed from the sideToNode dictionary that is passed in; the dictionary requires a key specified by two Vector3 points and a laneName
|
|
getClosestNode ( Vector3 pos ) : Node, |
Given a Vector3 pos, returns the Node in the list of Nodes that is closest to it.
|
|
getNodeWithVectorCoordinates ( Node>.Dictionary |
Returns the node that corresponds to the coordinates of the given Vector3. Checks for the node corresponding to the key constructured from the coordinates in the coordinatesToNode dictionary; if not in the dictionary, creates the node and adds it to the dictionary.
|
public AddToDictionary ( Dictionary |
||
dict | Dictionary |
// the dictionary that maps a Node to the list of Triangles that contain // that Node on a side // |
key | Node, | a Node |
value | Triangle, | a Triangle to add to the list of Triangles that the key currently maps to |
return | void |
public GenerateGraph ( ) : System.Collections | ||
return | System.Collections |
public GetPairString ( Vector3 v1, Vector3 v2 ) : string | ||
v1 | Vector3 | the first given Vector3 |
v2 | Vector3 | the second given Vector3 |
return | string |
public addNodeNeighbor ( Node>.Dictionary |
||
sideToNode | Node>.Dictionary | // Maps a key specified by two Vector3 points (to specify a side) and a // laneName ("middle", "outer1", or "outer2") to a Node // |
givenNode | Node, | a Node to add a neighbor to |
first | Vector3 | the first Vector3 point |
second | Vector3 | the second Vector3 point |
laneName | string | the lane name ("middle", "outer1", or "outer2") |
return | void |
public getClosestNode ( Vector3 pos ) : Node, | ||
pos | Vector3 | a Vector3 |
return | Node, |
public getNodeWithVectorCoordinates ( Node>.Dictionary |
||
coordinatesToNode | Node>.Dictionary | // dictionary containing mappings from the coordinates of a Vector3 to the corresponding // node // |
givenVector | Vector3 | a Vector3 |
return | Node, |