Cesium Native is a set of C++ libraries for 3D geospatial, including:
Cesium Native powers Cesium's runtime integrations for Cesium for Unreal, Cesium for Unity, Cesium for Omniverse, and Cesium for O3DE. Cesium Native is the foundational layer for any 3D geospatial software, especially those that want to stream 3D Tiles.
A high-level Cesium platform architecture with the runtime integrations powered by Cesium Native and streaming content from Cesium ion.
Library | Description |
---|---|
Cesium3DTiles | Lightweight 3D Tiles classes. |
Cesium3DTilesReader | 3D Tiles deserialization, including 3D Tiles extension support. |
Cesium3DTilesWriter | 3D Tiles serialization, including 3D Tiles extension support. |
Cesium3DTilesSelection | Runtime streaming, decoding, level of detail selection, culling, cache management, and decoding of 3D Tiles. |
CesiumAsync | Classes for multi-threaded asynchronous tasks. |
CesiumGeometry | Common 3D geometry classes; and bounds testing, intersection testing, and spatial indexing algorithms. |
CesiumGeospatial | 3D geospatial math types and functions for ellipsoids, transforms, projections. |
CesiumGltf | Lightweight glTF processing and optimization functions. |
CesiumGltfReader | glTF deserialization / decoding, including glTF extension support (KHR_draco_mesh_compression etc). |
CesiumGltfWriter | glTF serialization / encoding, including glTF extension support. |
CesiumIonClient | Functions to access Cesium ion accounts and 3D tilesets using ion's REST API. |
CesiumJsonReader | Reads JSON from a buffer into statically-typed classes. |
CesiumJsonWriter | Writes JSON from statically-typed classes into a buffer. |
CesiumUtility | Utility functions for JSON parsing, URI processing, etc. |
Apache 2.0. Cesium Native is free for both commercial and non-commercial use.
Check out the repo with:
git clone git@github.com:CesiumGS/cesium-native.git --recurse-submodules
If you forget the --recurse-submodules
, nothing will work because the git submodules will be missing. You should be able to fix it with:
git submodule update --init --recursive
## Windows compilation using Visual Studio
cmake -B build -S . -G "Visual Studio 15 2017 Win64"
cmake --build build --config Debug
cmake --build build --config Release
## Linux compilation
cmake -B build -S .
cmake --build build
1) Install the CMake Tools
extension. It should prompt you to generate project files from CMake.
2) On Windows, choose Visual Studio 2017 Release - amd64
as the kit to build. Or choose an appropriate kit for your platform.
3) Then press Ctrl-Shift-P and execute the CMake: Build
task or press F7.
1) Open the CMake UI (cmake-gui) 2) Under "Where is the source code", point to your repo 3) Specify your output folder in "Where to build the binaries" 4) Click "Configure". 5) Under "Specify the generator for this project", choose the VS version on your system 6) Click Finish, wait for the process to finish 7) Click Generate
Look for cesium-native.sln in your output folder.
Unit tests can also be run from this solution, under the cesium-native-tests project.
cmake --build build --target cesium-native-docs
build/doc/html/index.html
Much of the code in CesiumGltf
, Cesium3DTiles
, CesiumGltfReader
, and Cesium3DTilesReader
is generated from the standards' JSON Schema specifications. To regenerate the code:
npm install
cd tools/generate-classes
npm install
cd ../..
npm run generate-gltf
npm run generate-3d-tiles
npm run generate-quantized-mesh-terrain
git add
them and git will fix the line endings (no need to commit).