C# 클래스 GenerateGraph, cs-mini-modbot-simulation

상속: MonoBehaviour
파일 보기 프로젝트 열기: intel-cornellcup/mini-modbot-simulation 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
endNode Node,

공개 메소드들

메소드 설명
AddToDictionary ( Dictionary &dict, Node, key, Triangle, value ) : void

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 sideToNode, Node, &givenNode, Vector3 first, Vector3 second, string laneName ) : void

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 &coordinatesToNode, Vector3 givenVector ) : Node,

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.

메소드 상세

AddToDictionary() 공개 메소드

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
public AddToDictionary ( Dictionary &dict, Node, key, Triangle, value ) : void
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
리턴 void

GenerateGraph() 공개 메소드

public GenerateGraph ( ) : System.Collections
리턴 System.Collections

GetPairString() 공개 메소드

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)
public GetPairString ( Vector3 v1, Vector3 v2 ) : string
v1 Vector3 the first given Vector3
v2 Vector3 the second given Vector3
리턴 string

Size() 공개 메소드

public Size ( ) : int
리턴 int

ToString() 공개 메소드

Returns a string representation of all the triangles of the nodes
public ToString ( ) : string
리턴 string

ToStringWithNeighbors() 공개 메소드

public ToStringWithNeighbors ( ) : string
리턴 string

addNodeNeighbor() 공개 메소드

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
public addNodeNeighbor ( Node>.Dictionary sideToNode, Node, &givenNode, Vector3 first, Vector3 second, string laneName ) : void
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")
리턴 void

getClosestNode() 공개 메소드

Given a Vector3 pos, returns the Node in the list of Nodes that is closest to it.
public getClosestNode ( Vector3 pos ) : Node,
pos Vector3 a Vector3
리턴 Node,

getNodeWithVectorCoordinates() 공개 메소드

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 getNodeWithVectorCoordinates ( Node>.Dictionary &coordinatesToNode, Vector3 givenVector ) : Node,
coordinatesToNode Node>.Dictionary // dictionary containing mappings from the coordinates of a Vector3 to the corresponding // node //
givenVector Vector3 a Vector3
리턴 Node,

프로퍼티 상세

endNode 공개적으로 프로퍼티

public Node, endNode
리턴 Node,