Create an Instant Terra C++ API instance

What is an "instance" ?

An instance is a link with Instant Terra. It allows to communicate with the software.

Open and close an instance

First, you must setup your project by specifying the API C++ headers folder, and the InstantTerraApi.lib for the linker.

#include <InstantTerraApi/public/Main.h>
#include <InstantTerraApi/public/InstantTerra.h>

int main()
{
    // Initialize the API
    InstantTerraApi::Init();

    // Start a new instance of Instant InstantTerra
    InstantTerraApi::InstantTerra it = InstantTerraApi::CreateInstantTerra();
    it.Start();

    // ... Some code here ...

    // At the end, we close the instance
    it.Close();

    // Then close the Instant Terra API
    InstantTerraApi::Close();

    return 0;
}

Copyright © 2020 · All Rights Reserved · Wysilab