C4 Engine Terathon Software C4 Engine API Documentation

• World Manager

API Links
Developer Links

Node::GetHub

Defined in:  C4Node.h
Returns the hub attached to a node.
Prototype

Hub *GetHub(voidconst;

Description
The GetHub function returns a pointer to the hub attached to a node. A hub exists for a node whenever the node has any outgoing or incoming connector. If a node has no hub, then the GetHub function returns nullptr.

To iterate over the connectors for a node, the member functions of the GraphElement base class can be used. For example, to iterate over all outgoing connectors, call the GraphElement::GetFirstOutgoingEdge function to retrieve the first connector, and then call GraphEdge::GetNextOutgoingEdge function for the connector until nullptr is returned.
See Also

Hub

Connector

Node::AddConnector

Node::RemoveConnector

Node::GetConnectedNode

Node::SetConnectedNode