EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
EBGeometry_FunctionQueries.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Robert Marskar <robert.marskar@sintef.no>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
11#ifndef EBGEOMETRY_FUNCTIONQUERIES_HPP
12#define EBGEOMETRY_FUNCTIONQUERIES_HPP
13
14// Std includes
15#include <cstdint>
16#include <type_traits>
17#include <utility>
18
19// Our includes
21#include "EBGeometry_GPU.hpp"
22#include "EBGeometry_Vec.hpp"
23
24namespace EBGeometry {
25
31constexpr unsigned int MaxOctreeDepth = 24;
32
61template <class F, class T>
62[[nodiscard]] EBGEOMETRY_HOST_DEVICE
65 const Vec3T<T>& a_initialLowCorner,
66 const Vec3T<T>& a_initialHighCorner,
67 const unsigned int a_maxTreeDepth,
68 const T& a_safety = T(0)) noexcept;
69
83template <class F, class T>
84[[nodiscard]] EBGEOMETRY_HOST_DEVICE
85inline Vec3T<T>
86normal(const F& a_function, const Vec3T<T>& a_point, const T& a_delta) noexcept;
87
88} // namespace EBGeometry
89
90#include "EBGeometry_FunctionQueriesImplem.hpp"
91
92#endif
Declarations of bounding volume types used in bounding volume hierarchies.
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
Axis-aligned bounding box (AABB) enclosing a set of 3D points.
Definition EBGeometry_BoundingVolumes.hpp:37
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
BoundingVolumes::AABBT< T > approximateBoundingVolumeOctree(const F &a_function, const Vec3T< T > &a_initialLowCorner, const Vec3T< T > &a_initialHighCorner, const unsigned int a_maxTreeDepth, const T &a_safety=T(0)) noexcept
Estimate the bounding box of a function's zero level set by octree subdivision.
Vec3T< T > normal(const F &a_function, const Vec3T< T > &a_point, const T &a_delta) noexcept
Outward unit normal of a function's level set, by central finite differences.
constexpr unsigned int MaxOctreeDepth
Deepest subdivision approximateBoundingVolumeOctree() accepts.
Definition EBGeometry_FunctionQueries.hpp:31