EBGeometry’s user documentation
EBGeometry is a header-only C++17 library of fast, portable geometry queries. It turns meshes, analytic shapes, point clouds and compositions of them into geometry you can ask questions: how far away is it, which surface is closest, where a ray hits it, what lies nearest. It answers them on CPUs and on GPUs, from the same code, with no dependencies.
Geometry in: triangle meshes (STL, PLY, OBJ, VTK) as a half-edge mesh or SIMD triangle blocks, analytic shapes and your own, and point clouds.
Composition: constructive solid geometry (unions, intersections, differences, smooth blends, offsets, repetitions and transforms), compiled into a tape for a scene or fused into compiled code for a part, and BVH-accelerated unions of thousands of objects.
Materials and domains: objects of several regions, each of a material, with the surfaces between them kept, and the domains a solver computes in, with their boundary conditions.
Models as text: the
.ebglanguage describes all of it in files a program reads at run time, andebgstudiochecks a model and shows it in a window, with no code to write.Queries: signed distance, normals and bounding boxes; the primitive that decides the value at a point; ray and segment hits; closest points and nearest neighbors in point clouds.
Looking at it: a renderer, on the host or a GPU, for any shape, with an optional interactive window (SDL2).
Performance: packed BVHs with any branching factor and a choice of builds, SIMD on the host (SSE to AVX-512), CUDA and HIP on the device, and a performance comparison on every change.
No dependencies: include
EBGeometry.hppin any C++17 project, infloatordouble.
There are two ways in. A library user writing C++ starts with Quickstart, the Overview of which queries each kind of geometry answers, and the About the examples. A modeler describing geometry, materials and boundary conditions for a solver starts with The .ebg language and the ebgstudio tutorial.
Important
This is the user documentation for EBGeometry.
A PDF version of this documentation is also available.
If you are looking for the source code, it is hosted on GitHub.
The developer documentation is a separate Doxygen-generated API of EBGeometry.