HARFANG®3D is an all-in-one 3D visualization library usable in C++, Python, Lua and Go.
#### Table of contents
1. [About](#section_1)
- [Features](#subsection_1a)
- [Screenshots](#subsection_1b)
2. [Download](#section_2)
3. [Building the SDK](#section_3)
- [Prerequisites](#subsection_3a)
- [Building](#subsection_3b)
4. [Using the C++ SDK](#section_4)
5. [Version](#section_5)
6. [License](#section_6)
<aname="section_1"></a>
# About
HARFANG®3D is an easy-to-adapt, cross-platform, multi-language, powerful and optimized solution to integrate with embedded systems, into existing environments and combining features to meet the industrial standards of real-time 3D imaging.
The HARFANG®3D architecture makes it easy to meet the requirements for hardware integration, display performance and security.
HARFANG®3D is written in C++ and is based on the open-source bgfx library supporting Vulkan, Metal, DirectX (from 9 to 12), OpenGL and OpenGL ES. It Builds on Windows, Linux, Intel and ARM.
<aname="subsection_1a"></a>
## Features
Platforms supported
* Win32 and Win64 Intel
* Linux 64 Intel
* Aarch 64 ARM
Scene API
* Node & component based
* Performance oriented
Rendering pipeline
* Low-spec PBR rendering pipeline
* High-spec 'AAA' rendering pipeline (screen space GI & reflection)
* Support of user pipeline shaders
VR API
* VR support via OpenVR/SteamVR with Eye tracking
* Compatible with the HTC Vive/Vive Pro, Valve Index, Lenovo Explorer, Oculus Rift S
Physics API
* Rigid bodies, collisions, mechanical constraints, ray casting
Audio API
* Play/stream WAV/OGG formats
* 3D audio spatialization
<aname="subsection_1b"></a>
## Screenshots
The following screenshots were captured on a 1080GTX in 1080P running at 60FPS.
*`HG_BUILD_HG_GO` : Build Harfang GO module (default: __OFF__).
1. Build the SDK.
```
cmake --build . --config Release --target INSTALL
```
_Note: On Linux you will need to explicitly specify the build type with `-DCMAKE_BUILD_TYPE=Release`_
Depending on the set of option passed to CMake the install directory will contain the following subdirectories:
*`cppsdk` : Harfang C++ SDK.
*`hg_python` : Harfang Python module.
*`hg_lua` : Harfang LUA module.
*`hg_go` : Harfang Go module.
*`assetc` : Asset compiler.
*`assimp_converter` : Assimp 3D model converter.
*`fbx_converter` : FBX converter.
*`gltf_importer` : GLTF importer.
*`gltf_exporter` : GLTF exporter.
### Notes on Visual Studio Code
1. Install the CMakeTools extension.
1. Copy the `harfang/.vscode/template_settings.json` file to `harfang/.vscode/settings.json` and edit it to reflect your local installation.
1. Open the `harfang` folder in Visual Studio Code. CMakeTools should succesfully configure the project.
<aname="section_4"></a>
# Use the SDK
The Harfang C++ SDK directory `cppsdk` contains the following:
*`bin` : depending on the configuration used, this directory contains either a `Release` or `Debug` subdirectory with all the shared libraries.
*`lib` : like the `bin` directory, it contains a subdirectories named after the configuration used during build (`Release` or `Debug`) with all the generated static libraries.
*`include` : contains all the C++ include files of Harfang public API.
*`cmake` : contains the CMake configuration files.
To add the Harfang C++ SDK to your CMake project, just add the following to the `CMakeLists.txt` file:
```cmake
find_package(harfang REQUIRED
COMPONENTS cppsdk
PATHS ${HG_CPPSDK_PATH}
NO_DEFAULT_PATH
)
```
with `HG_CPPSDK_PATH` the path to the `cppsdk` directory. For example, if we follow the directory layout given above, it will be `D:/harfang/build/install/cppsdk`.
Targets should link against the following libraries.
*`hg::engine`
*`hg::foundation`
*`hg::platform`
*`hg::libluadll`
The `install_cppsdk_dependencies` function installs the Harfang C++ SDK shared libraries dependencies.