Class InstantTerra


You have to include the header InstantTerra.h.

class InstantTerra

The main class of the API.


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


void InstantTerra::Close()

Closes Instant Terra instance


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


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


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();

Copyright © 2022 · All Rights Reserved · Wysilab