|
Enpose API — C++
Enpose 6-DoF tracking API
|
A header-only C++ wrapper around the Enpose C API. It adds RAII, std::vector/std::string results, and exceptions, while reusing the C ABI underneath. The wrapper is declared in the SDK header enpose_api.hpp and links the same enpose_api shared library as the C interface.
Failures throw enpose::Error. The PoseStream disconnects automatically when it goes out of scope.
In your own CMake project, link the C++ target — it pulls in the headers and the shared library transitively:
(In an in-tree / FetchContent build the same target is provided without find_package; see the top-level README.)
example.cpp is a complete discover-and-stream program. From the SDK's examples/cpp directory:
The example's CMakeLists.txt finds the SDK's CMake config automatically (it sits two levels up under lib/cmake/enpose_api), so no -DCMAKE_PREFIX_PATH is needed. At runtime the program needs to find the shared library — e.g. LD_LIBRARY_PATH=<sdk>/lib ./build/enpose_example_cpp.
The full API reference — every class, method, and field, generated from enpose_api.hpp — is published at https://enpose.tech/docs/cpp/.