Class: oLinkPath

$. oLinkPath

The $.oLinkPath class allows to figure out paths as a series of links between distant nodes.
It can either look for existing paths and check that two distant nodes are connected or create new ones that can then be connected.

new $.oLinkPath(startNode, endNode, outPortNum, inPortNum, outLinkNum)

openHarmony/openHarmony_nodeLink.js, line 1534
Constructor for $.oLinkPath class
Name Type Description
startNode $.oNode The first node from which the link is coming out.
endNode $.oNode The last node into which the link is connected.
outPortNum oScene optional The out-port of the startNode.
inPortNum oScene optional The in-port of the endNode.
outLinkNum oScene optional The link index coming out of the out-port of the startNode.
See:
  • NodeType

Members

readonlyisMultiLevelbool

Compares the start and end nodes groups to see if the path traverses several groups or not.

readonlylowestCommonGroup$.oGroupNode

Identifies the group in which the two nodes will connect if they are at different levels of depth.

Methods

connectPath(){Array.<$.oLink>}

openHarmony/openHarmony_nodeLink.js, line 1705
Connects all the unconnected links between two distant nodes
Returns:
Type Description
Array.<$.oLink> return the list of links present in the created path

findExistingPath(){Array.<$.oLink>}

openHarmony/openHarmony_nodeLink.js, line 1584
Finds an existing path if one exists between two distant nodes.
Returns:
Type Description
Array.<$.oLink> The list of successive $.oLink objects describing the path. Returns null if no such path could be found.

findNewPath(){Array.<$.oLink>}

openHarmony/openHarmony_nodeLink.js, line 1645
Finds a valid path between two distant nodes, even if one doesn't currently exist.
Returns:
Type Description
Array.<$.oLink> The list of links needed for the path. Some can already be connected.
openHarmony/openHarmony_nodeLink.js, line 1634
Gets a link object from two nodes that can be succesfully connected. Provide port numbers if there are specific requirements to match. If a link already exists, it will be returned.
Name Type Description
start $.oNode The node from which the link originates.
end $.oNode The node at which the link ends.
outPort int optional A prefered out-port for the link to use.
inPort int optional A prefered in-port for the link to use.
Returns:
Type Description
$.oLink the valid $.oLink object. Returns null if no such link could be created (for example if the node's in-port is already linked)