C# Class EdgeGraph.Edge

Afficher le fichier Open project: famerij/EdgeGraph Class Usage Examples

Méthodes publiques

Méthode Description
Edge ( ) : UnityEngine
Edge ( Edge edge ) : UnityEngine
Edge ( string _node1, string _node2 ) : UnityEngine
Edge ( string _node1, string _node2, float _width ) : UnityEngine
GetAdjacentNode ( Node current ) : string
GetAdjacentNode ( string current ) : string
GetClosestPointOnEdge ( Vector3 point, Vector3 _v1, Vector3 _v2 ) : Vector2

Returns closest point to an edge (v1,v2) in X-Z space.

GetLeftPerpendicular ( Vector3 v1, Vector3 v2 ) : Vector3
GetPerpendicularComparedToDirection ( Vector3 v1, Vector3 v2, Vector3 dir ) : Vector3
GetPerpendicularTowardsPoint ( Vector3 v1, Vector3 v2, Vector3 point ) : Vector3

Return left or right normal for edge, depending on which normal points towards the given point.

GetRightPerpendicular ( Vector3 v1, Vector3 v2 ) : Vector3
SplitEdge ( Edge edge, Vector3 point, List nodes, List edges, Node node = null ) : Node

Splits given edge into two edges at given point If a node is given, it will be used to split the edges Otherwise make a new node

Method Details

Edge() public méthode

public Edge ( ) : UnityEngine
Résultat UnityEngine

Edge() public méthode

public Edge ( Edge edge ) : UnityEngine
edge Edge
Résultat UnityEngine

Edge() public méthode

public Edge ( string _node1, string _node2 ) : UnityEngine
_node1 string
_node2 string
Résultat UnityEngine

Edge() public méthode

public Edge ( string _node1, string _node2, float _width ) : UnityEngine
_node1 string
_node2 string
_width float
Résultat UnityEngine

GetAdjacentNode() public méthode

public GetAdjacentNode ( Node current ) : string
current Node
Résultat string

GetAdjacentNode() public méthode

public GetAdjacentNode ( string current ) : string
current string
Résultat string

GetClosestPointOnEdge() public static méthode

Returns closest point to an edge (v1,v2) in X-Z space.
public static GetClosestPointOnEdge ( Vector3 point, Vector3 _v1, Vector3 _v2 ) : Vector2
point Vector3
_v1 Vector3
_v2 Vector3
Résultat Vector2

GetLeftPerpendicular() public static méthode

public static GetLeftPerpendicular ( Vector3 v1, Vector3 v2 ) : Vector3
v1 Vector3
v2 Vector3
Résultat Vector3

GetPerpendicularComparedToDirection() public static méthode

public static GetPerpendicularComparedToDirection ( Vector3 v1, Vector3 v2, Vector3 dir ) : Vector3
v1 Vector3
v2 Vector3
dir Vector3
Résultat Vector3

GetPerpendicularTowardsPoint() public static méthode

Return left or right normal for edge, depending on which normal points towards the given point.
public static GetPerpendicularTowardsPoint ( Vector3 v1, Vector3 v2, Vector3 point ) : Vector3
v1 Vector3
v2 Vector3
point Vector3
Résultat Vector3

GetRightPerpendicular() public static méthode

public static GetRightPerpendicular ( Vector3 v1, Vector3 v2 ) : Vector3
v1 Vector3
v2 Vector3
Résultat Vector3

SplitEdge() public static méthode

Splits given edge into two edges at given point If a node is given, it will be used to split the edges Otherwise make a new node
public static SplitEdge ( Edge edge, Vector3 point, List nodes, List edges, Node node = null ) : Node
edge Edge
point Vector3
nodes List
edges List
node Node
Résultat Node