Class InstantTerra

Note

You have to include the header InstantTerra.h.

class InstantTerra

The main class of the API.

Throws

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

// Create an instant of Instant Terra
InstantTerra instantTerra = CreateInstantTerra();
void InstantTerra::Start()

Starts a new instance of Instant Terra

Throws
instantTerra.Start();
void InstantTerra::Close()

Closes Instant Terra instance

Throws

Error – If Instant Terra is not started, an Error will be reported with the code ErrorCode::InstantTerraNotStarted.

instantTerra.Stop();
bool InstantTerra::IsRunning()

Returns true if an Instant Terra instance is currently running

bool isRunning = instantTerra.IsRunning();
Project InstantTerra::OpenProject(const wchar_t *projectName)

Opens a .terrain project

Throws

Error – If the file is not found, an Error will be reported with the code ErrorCode::UnableToOpenFile.

// Open the file "MyProject.terrain"
Project project = instantTerra.OpenProject(L"MyProject.terrain");
Project InstantTerra::NewProject()

Create a new default project

// New default project
Project project = instantTerra.NewProject();
Project InstantTerra::GetProject()

Returns the current project

// Current project
Project project = instantTerra.GetProject();