|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Namespace containing all of EBGeometry's functionality. More...
Namespaces | |
| namespace | BoundingVolumes |
| Namespace encapsulating bounding volume types for use with bounding volume hierarchies. | |
| namespace | BVH |
| Namespace for various bounding volume hierarchy (BVH) functionalities. | |
| namespace | DCEL |
| Namespace containing various double-connected edge list (DCEL) functionality. | |
| namespace | Octree |
| Namespace for octree functionality. | |
| namespace | Parser |
| Namespace which encapsulates possible file parsers for building EBGeometry data structures. | |
| namespace | PointSoA |
| Namespace for PointSoAT-related compile-time utilities. | |
| namespace | Random |
| Namespace for random sampling utilities (a single, centralized home for RNG use). | |
| namespace | SFC |
| Namespace for space-filling curves (SFCs) used to linearly order 3D grid cells. | |
| namespace | Soup |
| Namespace containing basic functionality for turning planar-polygon soups into DCEL meshes. | |
| namespace | TriangleSoA |
| Namespace for TriangleSoAT-related compile-time utilities. | |
Classes | |
| class | AnnularIF |
| Annular implicit function. Creates a shell out of the implicit function. More... | |
| class | BlurIF |
| Blurred/interpolated implicit function — can be used for smoothing. More... | |
| class | BoxSDF |
| Signed distance field for an axis-aligned box (AABB). More... | |
| class | BVHSmoothUnionIF |
| BVH-accelerated smooth union of implicit functions. More... | |
| class | BVHUnionIF |
| BVH-accelerated union of implicit functions. More... | |
| class | CapsuleSDF |
| Signed distance field for a capsule (pill shape): a cylinder capped with hemispheres. More... | |
| class | ComplementIF |
| Complemented implicit function. More... | |
| class | ConeSDF |
| Signed distance field for a finite cone. More... | |
| class | CylinderSDF |
| Signed distance field for a finite, flat-capped cylinder. More... | |
| class | DifferenceIF |
| Implicit function whose interior is the set difference A \ B. More... | |
| class | ElongateIF |
| Implicit function which is an elongation of another implicit function along each axis. More... | |
| class | FiniteRepetitionIF |
| Implicit function that tiles a base function periodically within a finite repetition count. More... | |
| class | FlatMeshSDF |
| Signed distance function for a DCEL mesh. Does not use BVHs. More... | |
| class | ImplicitFunction |
| Abstract representation of an implicit function (not necessarily a signed distance function). More... | |
| class | InfiniteConeSDF |
| Signed distance field for an infinite cone. More... | |
| class | InfiniteCylinderSDF |
| Signed distance field for an infinitely long cylinder. More... | |
| class | IntersectionIF |
| Implicit function whose interior is the intersection of all input function interiors. More... | |
| class | MeshSDF |
| Signed distance function for a DCEL mesh. Stores the mesh in a PackedBVH for SIMD-accelerated traversal. Accepts any polygon, not just triangles. More... | |
| class | MollifyIF |
| Mollified implicit function. More... | |
| class | OBJ |
| Class for storing contents of Wavefront OBJ files. More... | |
| class | OffsetIF |
| Offset implicit function. Offsets (grows or shrinks) the implicit function by a constant. More... | |
| class | PerlinSDF |
| Ken Perlin's gradient-noise implicit function. More... | |
| class | PlaneSDF |
| Signed distance function for a plane. More... | |
| class | PLY |
| Class for storing Stanford PLY meshes. More... | |
| struct | PointAoSoA |
| Metadata-carrying wrapper around a single PointSoAT<T, W>. More... | |
| class | PointCloudBVH |
| A PackedBVH specialized for point clouds, with a fast build and turnkey queries. More... | |
| class | PointCloudHashGrid |
| A uniform spatial grid specialized for point clouds, with a fast build and turnkey queries. More... | |
| struct | PointSoAT |
| True SoA (Structure of Arrays) layout for W point positions, enabling SIMD distance evaluation against the whole group at once. More... | |
| class | Polygon2D |
| Class for embedding a polygon face into 2D. More... | |
| class | ReflectIF |
| Implicit function which is a reflection of another implicit function. More... | |
| class | RotateIF |
| Rotated implicit function. Rotates an implicit function about an axis. More... | |
| class | RoundedBoxSDF |
| Signed distance field for an axis-aligned box with rounded corners. More... | |
| class | RoundedCylinderSDF |
| Signed distance field for a cylinder with rounded (toroidal) edges. More... | |
| class | ScaleIF |
| Uniformly scaled implicit function. More... | |
| class | SignedDistanceFunction |
| Abstract representation of a signed distance function. More... | |
| class | SimpleTimer |
| Simple timer class used for local performance profiling. More... | |
| class | SmoothDifferenceIF |
| Implicit function representing a smoothly blended set difference A \ B. More... | |
| class | SmoothIntersectionIF |
| Implicit function whose interior is a smoothly blended intersection of all input function interiors. More... | |
| class | SmoothUnionIF |
| Implicit function whose interior is a smoothly blended union of all input function interiors. More... | |
| class | SphereSDF |
| Signed distance field for a sphere. More... | |
| class | STL |
| Class for storing contents of STL files. More... | |
| class | TorusSDF |
| Signed distance field for a torus. More... | |
| class | TranslateIF |
| Translated implicit function. More... | |
| class | Triangle |
| Triangle class with signed distance functionality. More... | |
| struct | TriangleSoAT |
| SoA (Structure of Arrays) layout for W triangles, enabling SIMD evaluation. More... | |
| class | TriMeshSDF |
| Signed distance function for a pure triangle mesh using SoA-grouped primitives in a compact (linearized) BVH. More... | |
| class | UnionIF |
| Implicit function whose interior is the union of all input function interiors. More... | |
| class | Vec2T |
| Two-dimensional vector class with arithmetic operators. More... | |
| class | Vec3T |
| Three-dimensional vector class with arithmetic operators. More... | |
| class | VTK |
| Class for storing VTK Polydata meshes. More... | |
Functions | |
| template<class T , class P = ImplicitFunction<T>> | |
| std::shared_ptr< ImplicitFunction< T > > | Union (const std::vector< std::shared_ptr< P > > &a_implicitFunctions) |
| Constructs an implicit function whose interior is the union of the interiors of all input functions. | |
| template<class T , class P1 , class P2 > | |
| std::shared_ptr< ImplicitFunction< T > > | Union (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB) |
| Constructs an implicit function whose interior is the union of the interiors of A and B. | |
| template<class T , class P = ImplicitFunction<T>> | |
| std::shared_ptr< ImplicitFunction< T > > | SmoothUnion (const std::vector< std::shared_ptr< P > > &a_implicitFunctions, const T a_smooth) |
| Constructs an implicit function whose interior is a smoothly blended union of all input function interiors. | |
| template<class T , class P1 , class P2 > | |
| std::shared_ptr< ImplicitFunction< T > > | SmoothUnion (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB, const T a_smooth) |
| Constructs an implicit function whose interior is a smoothly blended union of the interiors of A and B. | |
| template<class T , class P , class BV , size_t K> | |
| std::shared_ptr< ImplicitFunction< T > > | BVHUnion (const std::vector< std::shared_ptr< P > > &a_implicitFunctions, const std::vector< BV > &a_boundingVolumes) |
| Constructs a BVH-accelerated union of implicit functions. | |
| template<class T , class P , class BV , size_t K> | |
| std::shared_ptr< ImplicitFunction< T > > | BVHSmoothUnion (const std::vector< std::shared_ptr< P > > &a_implicitFunctions, const std::vector< BV > &a_boundingVolumes, const T a_smoothLen) noexcept |
| Constructs a BVH-accelerated smooth union of implicit functions. | |
| template<class T , class P > | |
| std::shared_ptr< ImplicitFunction< T > > | Intersection (const std::vector< std::shared_ptr< P > > &a_implicitFunctions) |
| Constructs an implicit function whose interior is the intersection of the interiors of all input functions. | |
| template<class T , class P1 , class P2 > | |
| std::shared_ptr< ImplicitFunction< T > > | Intersection (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB) |
| Constructs an implicit function whose interior is the intersection of the interiors of A and B. | |
| template<class T , class P > | |
| std::shared_ptr< ImplicitFunction< T > > | SmoothIntersection (const std::vector< std::shared_ptr< P > > &a_implicitFunctions, const T a_smooth) |
| Constructs an implicit function whose interior is a smoothly blended intersection of all input function interiors. | |
| template<class T , class P1 , class P2 > | |
| std::shared_ptr< ImplicitFunction< T > > | SmoothIntersection (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB, const T a_smooth) |
| Constructs an implicit function whose interior is a smoothly blended intersection of the interiors of A and B. | |
| template<class T , class P1 = ImplicitFunction<T>, class P2 = ImplicitFunction<T>> | |
| std::shared_ptr< ImplicitFunction< T > > | Difference (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB) |
| Constructs an implicit function whose interior is the set difference A \ B. | |
| template<class T , class P1 = ImplicitFunction<T>, class P2 = ImplicitFunction<T>> | |
| std::shared_ptr< ImplicitFunction< T > > | SmoothDifference (const std::shared_ptr< P1 > &a_implicitFunctionA, const std::shared_ptr< P2 > &a_implicitFunctionB, const T a_smoothLen) |
| Constructs an implicit function representing a smoothly blended set difference A \ B. | |
| template<class T , class P = ImplicitFunction<T>> | |
| std::shared_ptr< ImplicitFunction< T > > | FiniteRepetition (const std::shared_ptr< P > &a_implicitFunction, const Vec3T< T > &a_period, const Vec3T< T > &a_repeatLo, const Vec3T< T > &a_repeatHi) |
| Constructs a periodically tiled implicit function with finite extent. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Complement (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction) |
| Convenience function for taking the complement of an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Translate (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_shift) |
| Convenience function for translating an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Rotate (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_angle, const size_t a_axis) |
| Convenience function for rotating an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Scale (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_scale) |
| Convenience function for scaling an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Offset (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_offset) |
| Convenience function for offsetting an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Annular (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_delta) |
| Convenience function for creating a shell out of an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Blur (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_blurDistance) |
| Convenience function for blurring an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Mollify (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_dist, const size_t a_mollifierSamples=2) |
| Convenience function for mollification with an input sphere. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Elongate (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_elongation) |
| Convenience function for elongating (stretching) an implicit function. | |
| template<class T > | |
| std::shared_ptr< ImplicitFunction< T > > | Reflect (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const size_t &a_reflectPlane) |
| Convenience function for reflecting an implicit function. | |
| template<typename T > | |
| constexpr Vec2T< T > | operator* (const T &s, const Vec2T< T > &a_other) noexcept |
| Scalar-left multiplication: s * vec. | |
| template<typename T > | |
| constexpr Vec2T< T > | operator/ (const T &s, const Vec2T< T > &a_other) noexcept |
| Component-wise scalar-left division: s / vec. | |
| template<typename T > | |
| Vec2T< T > | min (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Component-wise minimum of two vectors. | |
| template<typename T > | |
| Vec2T< T > | max (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Component-wise maximum of two vectors. | |
| template<typename T > | |
| T | dot (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Dot product of two 2D vectors. | |
| template<typename T > | |
| T | length (const Vec2T< T > &v) noexcept |
| Euclidean length of a 2D vector. | |
| template<class R , typename T > | |
| constexpr Vec3T< T > | operator* (const R &s, const Vec3T< T > &u) noexcept |
| Scalar-left multiplication: s * vec. | |
| template<typename T > | |
| constexpr Vec3T< T > | operator* (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Component-wise multiplication of two vectors. | |
| template<class R , typename T > | |
| constexpr Vec3T< T > | operator/ (const R &s, const Vec3T< T > &u) noexcept |
| Component-wise scalar-left division: s / vec. | |
| template<typename T > | |
| constexpr Vec3T< T > | min (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Component-wise minimum of two 3D vectors. | |
| template<typename T > | |
| constexpr Vec3T< T > | max (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Component-wise maximum of two 3D vectors. | |
| template<typename T > | |
| constexpr Vec3T< T > | clamp (const Vec3T< T > &v, const Vec3T< T > &lo, const Vec3T< T > &hi) noexcept |
| Component-wise clamp of a 3D vector. | |
| template<typename T > | |
| constexpr T | dot (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Dot product of two 3D vectors. | |
| template<typename T > | |
| constexpr Vec3T< T > | cross (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Cross product of two 3D vectors. | |
| template<typename T > | |
| constexpr T | length (const Vec3T< T > &v) noexcept |
| Euclidean length of a 3D vector. | |
Variables | |
| template<class T > | |
| constexpr T | pi = T(3.14159265358979323846L) |
| The mathematical constant π, typed as T. | |
| template<class T > | |
| std::function< T(const T &a, const T &b, const T &s)> | ExpMin |
| Exponential smooth minimum for blending two signed-distance values. | |
| template<class T > | |
| std::function< T(const T &a, const T &b, const T &s)> | SmoothMin |
| Quadratic polynomial smooth minimum for blending two signed-distance values. | |
| template<class T > | |
| std::function< T(const T &a, const T &b, const T &s)> | SmoothMax |
| Quadratic polynomial smooth maximum for blending two signed-distance values. | |
Namespace containing all of EBGeometry's functionality.
EBGeometry is a header-only C++17 library for implicit functions, signed distance functions, constructive solid geometry (CSG), and DCEL surface meshes. Including EBGeometry.hpp exposes every public class and free function through this namespace.
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Annular | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_delta | ||
| ) |
Convenience function for creating a shell out of an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be shelled. |
| [in] | a_delta | Shell thickness |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Blur | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_blurDistance | ||
| ) |
Convenience function for blurring an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be blurred |
| [in] | a_blurDistance | Smoothing distance |
|
noexcept |
Constructs a BVH-accelerated smooth union of implicit functions.
Uses the BVH to locate the two nearest primitives and applies a smooth-minimum to their values, yielding C1 (or better) blending across nearby surfaces. Sub-linear query cost.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| BV | Bounding volume type (e.g. AABBT<T>). |
| K | BVH branching factor. |
| [in] | a_implicitFunctions | Input implicit functions. |
| [in] | a_boundingVolumes | Bounding volumes for each implicit function. |
| [in] | a_smoothLen | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::BVHUnion | ( | const std::vector< std::shared_ptr< P > > & | a_implicitFunctions, |
| const std::vector< BV > & | a_boundingVolumes | ||
| ) |
Constructs a BVH-accelerated union of implicit functions.
Wraps a PackedBVH over the inputs; at query time the BVH culls primitives whose bounding volume is further than the current best distance, giving sub-linear cost on large scenes. Interior semantics are identical to UnionIF.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| BV | Bounding volume type (e.g. AABBT<T>). |
| K | BVH branching factor. |
| [in] | a_implicitFunctions | Input implicit functions. |
| [in] | a_boundingVolumes | Bounding volumes for each implicit function. |
|
inlineconstexprnoexcept |
Component-wise clamp of a 3D vector.
| T | Floating-point precision. |
| [in] | v | Vector to be clamped. |
| [in] | lo | Component-wise lower bound. |
| [in] | hi | Component-wise upper bound. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Complement | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction | ) |
Convenience function for taking the complement of an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function |
|
inlineconstexprnoexcept |
Cross product of two 3D vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Difference | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB | ||
| ) |
Constructs an implicit function whose interior is the set difference A \ B.
A point is inside the result if and only if it is inside A and outside B.
| T | Floating-point precision. |
| P1 | Type of the minuend A; must derive from ImplicitFunction<T>. |
| P2 | Type of the subtrahend B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | Minuend implicit function. |
| [in] | a_implicitFunctionB | Subtrahend implicit function. |
|
inlinenoexcept |
Dot product of two 2D vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
|
inlineconstexprnoexcept |
Dot product of two 3D vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Elongate | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const Vec3T< T > & | a_elongation | ||
| ) |
Convenience function for elongating (stretching) an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Implicit function to be elongated |
| [in] | a_elongation | Per-axis elongation amounts |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::FiniteRepetition | ( | const std::shared_ptr< P > & | a_implicitFunction, |
| const Vec3T< T > & | a_period, | ||
| const Vec3T< T > & | a_repeatLo, | ||
| const Vec3T< T > & | a_repeatHi | ||
| ) |
Constructs a periodically tiled implicit function with finite extent.
The query point is folded into the nearest cell before evaluating the base function. The repetition count is clamped to [a_repeatLo, a_repeatHi] per axis; outside this range the nearest tile is evaluated.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunction | Base implicit function to tile. |
| [in] | a_period | Tile period in each coordinate direction (all components must be > 0). |
| [in] | a_repeatLo | Repetition count for decreasing coordinates (integer values). |
| [in] | a_repeatHi | Repetition count for increasing coordinates (integer values). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Intersection | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB | ||
| ) |
Constructs an implicit function whose interior is the intersection of the interiors of A and B.
| T | Floating-point precision. |
| P1 | Type of A; must derive from ImplicitFunction<T>. |
| P2 | Type of B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | First implicit function. |
| [in] | a_implicitFunctionB | Second implicit function. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Intersection | ( | const std::vector< std::shared_ptr< P > > & | a_implicitFunctions | ) |
Constructs an implicit function whose interior is the intersection of the interiors of all input functions.
The returned object evaluates to the maximum over all input functions at any query point.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctions | Input implicit functions. |
Euclidean length of a 2D vector.
| T | Floating-point precision. |
| [in] | v | Vector. |
|
inlineconstexprnoexcept |
Euclidean length of a 3D vector.
| T | Floating-point precision. |
| [in] | v | Vector. |
|
inlinenoexcept |
Component-wise maximum of two vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
|
inlineconstexprnoexcept |
Component-wise maximum of two 3D vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
|
inlinenoexcept |
Component-wise minimum of two vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
|
inlineconstexprnoexcept |
Component-wise minimum of two 3D vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Mollify | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_dist, | ||
| const size_t | a_mollifierSamples = 2 |
||
| ) |
Convenience function for mollification with an input sphere.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be mollified |
| [in] | a_dist | Mollification distance. |
| [in] | a_mollifierSamples | Number of samples per dimension for the convolution kernel (must be >= 1). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Offset | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_offset | ||
| ) |
Convenience function for offsetting an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be offset |
| [in] | a_offset | Offset distance subtracted from the function value |
|
inlineconstexprnoexcept |
Scalar-left multiplication: s * vec.
| R | Type of scalar (may differ from T, e.g. int * Vec3T<double>). |
| T | Floating-point precision of the vector. |
| [in] | s | Scalar multiplier. |
| [in] | u | Vector. |
|
inlineconstexprnoexcept |
Scalar-left multiplication: s * vec.
| T | Floating-point precision. |
| [in] | s | Scalar multiplier. |
| [in] | a_other | Vector. |
|
inlineconstexprnoexcept |
Component-wise multiplication of two vectors.
| T | Floating-point precision. |
| [in] | u | First vector. |
| [in] | v | Second vector. |
|
inlineconstexprnoexcept |
Component-wise scalar-left division: s / vec.
Returns a new vector where each component i is s / u[i].
| R | Type of scalar numerator. |
| T | Floating-point precision of the vector. |
| [in] | s | Scalar numerator. |
| [in] | u | Vector whose components are the denominators. |
|
inlineconstexprnoexcept |
Component-wise scalar-left division: s / vec.
Returns a new vector where each component i is s / a_other[i].
| T | Floating-point precision. |
| [in] | s | Scalar numerator. |
| [in] | a_other | Vector whose components are the denominators. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Reflect | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const size_t & | a_reflectPlane | ||
| ) |
Convenience function for reflecting an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Implicit function to be reflected |
| [in] | a_reflectPlane | Plane to reflect across (0=yz-plane, 1=xz-plane, 2=xy-plane). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Rotate | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_angle, | ||
| const size_t | a_axis | ||
| ) |
Convenience function for rotating an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be rotated. |
| [in] | a_angle | Angle to be rotated by (in degrees) |
| [in] | a_axis | Axis to rotate about (0=x, 1=y, 2=z) |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Scale | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const T | a_scale | ||
| ) |
Convenience function for scaling an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be scaled. |
| [in] | a_scale | Scaling factor (must be non-zero) |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::SmoothDifference | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB, | ||
| const T | a_smoothLen | ||
| ) |
Constructs an implicit function representing a smoothly blended set difference A \ B.
Implemented as a smooth intersection of A with the complement of B.
| T | Floating-point precision. |
| P1 | Type of the minuend A; must derive from ImplicitFunction<T>. |
| P2 | Type of the subtrahend B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | Minuend implicit function. |
| [in] | a_implicitFunctionB | Subtrahend implicit function. |
| [in] | a_smoothLen | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::SmoothIntersection | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB, | ||
| const T | a_smooth | ||
| ) |
Constructs an implicit function whose interior is a smoothly blended intersection of the interiors of A and B.
| T | Floating-point precision. |
| P1 | Type of A; must derive from ImplicitFunction<T>. |
| P2 | Type of B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | First implicit function. |
| [in] | a_implicitFunctionB | Second implicit function. |
| [in] | a_smooth | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::SmoothIntersection | ( | const std::vector< std::shared_ptr< P > > & | a_implicitFunctions, |
| const T | a_smooth | ||
| ) |
Constructs an implicit function whose interior is a smoothly blended intersection of all input function interiors.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctions | Input implicit functions. |
| [in] | a_smooth | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::SmoothUnion | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB, | ||
| const T | a_smooth | ||
| ) |
Constructs an implicit function whose interior is a smoothly blended union of the interiors of A and B.
| T | Floating-point precision. |
| P1 | Type of A; must derive from ImplicitFunction<T>. |
| P2 | Type of B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | First implicit function. |
| [in] | a_implicitFunctionB | Second implicit function. |
| [in] | a_smooth | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::SmoothUnion | ( | const std::vector< std::shared_ptr< P > > & | a_implicitFunctions, |
| const T | a_smooth | ||
| ) |
Constructs an implicit function whose interior is a smoothly blended union of all input function interiors.
Uses SmoothMin to blend the two closest values; the blend region width is a_smooth.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctions | Input implicit functions. |
| [in] | a_smooth | Smoothing length (must be > 0). |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Translate | ( | const std::shared_ptr< ImplicitFunction< T > > & | a_implicitFunction, |
| const Vec3T< T > & | a_shift | ||
| ) |
Convenience function for translating an implicit function.
| T | Floating-point precision |
| [in] | a_implicitFunction | Input implicit function to be translated |
| [in] | a_shift | Distance to shift |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Union | ( | const std::shared_ptr< P1 > & | a_implicitFunctionA, |
| const std::shared_ptr< P2 > & | a_implicitFunctionB | ||
| ) |
Constructs an implicit function whose interior is the union of the interiors of A and B.
| T | Floating-point precision. |
| P1 | Type of A; must derive from ImplicitFunction<T>. |
| P2 | Type of B; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctionA | First implicit function. |
| [in] | a_implicitFunctionB | Second implicit function. |
| std::shared_ptr< ImplicitFunction< T > > EBGeometry::Union | ( | const std::vector< std::shared_ptr< P > > & | a_implicitFunctions | ) |
Constructs an implicit function whose interior is the union of the interiors of all input functions.
The returned object evaluates to the minimum over all input functions at any query point.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| [in] | a_implicitFunctions | Input implicit functions. |
Exponential smooth minimum for blending two signed-distance values.
Approximates min(a, b) with exponential weighting; the blend region width scales with s. Useful when a differentiable interface is required. Approaches min(a, b) as s → 0.
| T | Floating-point precision. |
| [in] | a | First value. |
| [in] | b | Second value. |
| [in] | s | Smoothing length (must be > 0). |
The mathematical constant π, typed as T.
Defined to 20 significant digits, which covers the full precision of both float (7 significant digits) and long double (18–21 significant digits).
| T | Floating-point type. |
Quadratic polynomial smooth maximum for blending two signed-distance values.
Approximates max(a, b) within the overlap region |a - b| < s; coincides exactly with max(a, b) outside that region. Symmetric counterpart to SmoothMin; used for CSG intersections and differences.
| T | Floating-point precision. |
| [in] | a | First value. |
| [in] | b | Second value. |
| [in] | s | Smoothing length (must be > 0). Controls the blend region width. |
Quadratic polynomial smooth minimum for blending two signed-distance values.
Approximates min(a, b) within the overlap region |a - b| < s; coincides exactly with min(a, b) outside that region. Cheaper to evaluate than ExpMin and the default choice for CSG unions.
| T | Floating-point precision. |
| [in] | a | First value. |
| [in] | b | Second value. |
| [in] | s | Smoothing length (must be > 0). Controls the blend region width. |