Class Graph

Note

You have to include the header Graph.h.

class Graph

This class represents a project Graph in Instant Terra.

Throws

Error – In any of these commands, if the communication is off, the following error code will be reported ErrorCode::CommunicationError.

// Get graph of the default project on Instant Terra
InstantTerra instantTerra = CreateInstantTerra();
Project project = instantTerra.GetProject();

Graph graph = project.GetGraph();
int Graph::GetNodeCount()

Returns the number of nodes on the Graph

Node Graph::GetNode(int nodeIndex)

Returns a Node from the Graph.

Warning

The parameter nodeIndex must be between 0 included and GetNodeCount() excluded.

Throws

Error – If the nodeIndex is out of bound, the following error code will be reported ErrorCode::NodeIndexOutOfBound.

bool Graph::IsGraphAvailable()

Returns true if the Graph is available.