![]() |
SCENE C++ API
2.1.2
|
This article illustrates how you can set up your development environment in order to be able to develop standalone apps for the SCENE platform. Starting with the setup requires the following:
Run the installer of the developer package and follow the on-screen installation instructions. In the installation directory of the developer package you will find additional documentation, samples and resources to get started with the app development.
The installation directory of the developer package contains the following sub-directories:
The SCENE API provides a C++ interface which can be accessed by standalone apps to make use of the API functionality.
C:\SCENE API\SCENE API Standalone Developer Package 2.1.0 x64\c++\include
C:\SCENE API\SCENE API App Developer Package 2.1.0 x64\c++\lib\x64
Core_API.lib
and Standalone_API.lib
to the Additional Dependencies.In Configuration Properties > C/C++ > Manifest File, add an entry for the SCENE API redistributable to the Additional Manifest Dependencies, e.g.
type='win32' name='FARO.SCENE.Redistributable' version='2.1.0.0' processorArchitecture='amd64' publicKeyToken='1d23f5635ba800ab'
Note: In order to be able to use the SCENE API, your project has to be configured to target 64bit platforms. More Information on how to setup your project for 64bit platforms can be found at the following link: How to: Configure Visual C++ Projects to Target 64-Bit Platforms.
Before accessing any of the API interfaces, you should make sure that an application context for your application exists. The application context initializes essential data structures used by other API interfaces and also cleans up those data structures once it is deleted. Therefore, you should also make sure that the created application context is always the last API object to be destroyed in your application. Standalone apps can simply create an application context by creating an instance of the LSStandaloneContext class:
#include <standalone_api/lsstandalonecontext.h> using namespace SCENE_API int main(int argc, char *argv[]) { // Standalone Apps always need to make sure to instantiate a standalone // context before using any other API functionality. This context has to // exist at least as along as any other API object! LSStandaloneContext context; return 0; }
When you are using the SCENE API in your application, you need to make sure that it is properly deployed and installed together with your software. Generally, you can find all the required dependencies you need to include and install with your software in the bin/ directory within the installation directory of the SCENE API Standalone Developer Package. The dependencies required to use the SCENE API include:
msiexec.exe /quiet /I "SCENE Redistributable Package 2.x.y.z x64.msi
vcredist_x64_2022.exe /install /quiet /norestart