Class GraphLayout
- Namespace
- ValveResourceFormat.Utils
- Assembly
- ValveResourceFormat.dll
Generic graph layout algorithm based on Sugiyama's hierarchical layout method.
public static class GraphLayoutInheritance
Inherited Members
Methods
LayoutNodes<TNode, TConnection>(IEnumerable<TNode>, IEnumerable<TConnection>, Func<TNode, Vector2>, Action<TNode, Vector2>, Func<TNode, Vector2>, Func<TConnection, TNode>, Func<TConnection, TNode>, Func<TNode, IEnumerable<TConnection>>, Func<TNode, IEnumerable<TConnection>>, LayoutOptions?)
Layouts nodes in a hierarchical arrangement using the Sugiyama algorithm.
public static void LayoutNodes<TNode, TConnection>(IEnumerable<TNode> nodes, IEnumerable<TConnection> connections, Func<TNode, Vector2> getPosition, Action<TNode, Vector2> setPosition, Func<TNode, Vector2> getSize, Func<TConnection, TNode> getSourceNode, Func<TConnection, TNode> getTargetNode, Func<TNode, IEnumerable<TConnection>> getInputConnections, Func<TNode, IEnumerable<TConnection>> getOutputConnections, GraphLayout.LayoutOptions? options = null) where TNode : classParameters
nodesIEnumerable<TNode>-
The nodes to layout.
connectionsIEnumerable<TConnection>-
The connections between nodes.
getPositionFunc<TNode, Vector2>-
Function to get a node's current position.
setPositionAction<TNode, Vector2>-
Function to set a node's position.
getSizeFunc<TNode, Vector2>-
Function to get a node's size.
getSourceNodeFunc<TConnection, TNode>-
Function to get the source node from a connection.
getTargetNodeFunc<TConnection, TNode>-
Function to get the target node from a connection.
getInputConnectionsFunc<TNode, IEnumerable<TConnection>>-
Function to get connections where this node is the target (optional, for barycenter calculation).
getOutputConnectionsFunc<TNode, IEnumerable<TConnection>>-
Function to get connections where this node is the source (optional, for barycenter calculation).
optionsGraphLayout.LayoutOptions?-
Layout options (uses defaults if null).
Type Parameters
TNode-
Type representing a node.
TConnection-
Type representing a connection between nodes.