C# Класс EdgeGraph.EdgeGraphUtility

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CheckAdjacentNodes ( List &_nodes, List &_edges ) : void
CleanUpEdges ( List &nodes, List &edges ) : void
CopyNodesAndEdges ( List _nodes, List _edges, List &_newNodes, List &_newEdges, bool adjacentCheck = true, bool cleanUp = true ) : void

Makes copies of edges and nodes New edges will have new IDs and new copies of nodes

FindEdgeByNodes ( Node n1, Node n2, List _edges ) : Edge
FindEdgeByNodes ( string n1, string n2, List _edges ) : Edge
FixIntersectingEdges ( List &nodes, List &edges ) : bool
GetClosestEdge ( Vector3 point, List nodes, List edges, Transform refTransform ) : Edge

Returns closest edge to the world point. Edge positions are changed to world coordinates in reference to refTransform.

GetClosestNode ( Vector3 point, List nodes, Transform refTransform ) : Node

Returns closest node to the world point. Node positions are changed to world coordinates in reference to refTransform.

GetClosestPointOnEdge ( Vector3 point, List nodes, List edges, Transform refTransform, Edge &closestEdge ) : Vector3

Returns closest point on all the given edges. Edge positions are changed to world coordinates in reference to refTransform.

GetEdge ( string id, List &_edges ) : Edge
GetEdgePosition ( string id, List &_nodes, List &_edges, Transform transform = null ) : Vector3
GetNode ( int index, List &_nodes ) : Node
GetNode ( string id, List &_nodes ) : Node
GetPointOnClosestEdge ( Vector3 point, List nodes, List edges, Transform refTransform ) : Vector3

Returns closest point on the closest point with given point

PointIsInside ( Vector3 point, List nodes, List edges ) : bool

Checks if given point is inside the edges. The point must be in the same space than node positions

RemoveEdgeAndCleanAdjacents ( Node _n0, Node _n1, List &_nodes, List &_edges ) : Edge
RemoveNodeAndCleanAdjacents ( Node n, List &_nodes, List &_edges ) : void

Описание методов

CheckAdjacentNodes() публичный статический Метод

public static CheckAdjacentNodes ( List &_nodes, List &_edges ) : void
_nodes List
_edges List
Результат void

CleanUpEdges() публичный статический Метод

public static CleanUpEdges ( List &nodes, List &edges ) : void
nodes List
edges List
Результат void

CopyNodesAndEdges() публичный статический Метод

Makes copies of edges and nodes New edges will have new IDs and new copies of nodes
public static CopyNodesAndEdges ( List _nodes, List _edges, List &_newNodes, List &_newEdges, bool adjacentCheck = true, bool cleanUp = true ) : void
_nodes List
_edges List
_newNodes List
_newEdges List
adjacentCheck bool
cleanUp bool
Результат void

FindEdgeByNodes() публичный статический Метод

public static FindEdgeByNodes ( Node n1, Node n2, List _edges ) : Edge
n1 Node
n2 Node
_edges List
Результат Edge

FindEdgeByNodes() публичный статический Метод

public static FindEdgeByNodes ( string n1, string n2, List _edges ) : Edge
n1 string
n2 string
_edges List
Результат Edge

FixIntersectingEdges() публичный статический Метод

public static FixIntersectingEdges ( List &nodes, List &edges ) : bool
nodes List
edges List
Результат bool

GetClosestEdge() публичный статический Метод

Returns closest edge to the world point. Edge positions are changed to world coordinates in reference to refTransform.
public static GetClosestEdge ( Vector3 point, List nodes, List edges, Transform refTransform ) : Edge
point UnityEngine.Vector3
nodes List
edges List
refTransform UnityEngine.Transform
Результат Edge

GetClosestNode() публичный статический Метод

Returns closest node to the world point. Node positions are changed to world coordinates in reference to refTransform.
public static GetClosestNode ( Vector3 point, List nodes, Transform refTransform ) : Node
point UnityEngine.Vector3
nodes List
refTransform UnityEngine.Transform
Результат Node

GetClosestPointOnEdge() публичный статический Метод

Returns closest point on all the given edges. Edge positions are changed to world coordinates in reference to refTransform.
public static GetClosestPointOnEdge ( Vector3 point, List nodes, List edges, Transform refTransform, Edge &closestEdge ) : Vector3
point UnityEngine.Vector3
nodes List
edges List
refTransform UnityEngine.Transform
closestEdge Edge
Результат UnityEngine.Vector3

GetEdge() публичный статический Метод

public static GetEdge ( string id, List &_edges ) : Edge
id string
_edges List
Результат Edge

GetEdgePosition() публичный статический Метод

public static GetEdgePosition ( string id, List &_nodes, List &_edges, Transform transform = null ) : Vector3
id string
_nodes List
_edges List
transform UnityEngine.Transform
Результат UnityEngine.Vector3

GetNode() публичный статический Метод

public static GetNode ( int index, List &_nodes ) : Node
index int
_nodes List
Результат Node

GetNode() публичный статический Метод

public static GetNode ( string id, List &_nodes ) : Node
id string
_nodes List
Результат Node

GetPointOnClosestEdge() публичный статический Метод

Returns closest point on the closest point with given point
public static GetPointOnClosestEdge ( Vector3 point, List nodes, List edges, Transform refTransform ) : Vector3
point UnityEngine.Vector3
nodes List
edges List
refTransform UnityEngine.Transform
Результат UnityEngine.Vector3

PointIsInside() публичный статический Метод

Checks if given point is inside the edges. The point must be in the same space than node positions
public static PointIsInside ( Vector3 point, List nodes, List edges ) : bool
point UnityEngine.Vector3
nodes List
edges List
Результат bool

RemoveEdgeAndCleanAdjacents() публичный статический Метод

public static RemoveEdgeAndCleanAdjacents ( Node _n0, Node _n1, List &_nodes, List &_edges ) : Edge
_n0 Node
_n1 Node
_nodes List
_edges List
Результат Edge

RemoveNodeAndCleanAdjacents() публичный статический Метод

public static RemoveNodeAndCleanAdjacents ( Node n, List &_nodes, List &_edges ) : void
n Node
_nodes List
_edges List
Результат void