|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Namespace containing various double-connected edge list (DCEL) functionality. More...
Namespaces | |
| namespace | ReconcileDetail |
| Internals of DCEL::ReconcileSchedule and DCEL::reconcile(). | |
| namespace | VertexDetail |
| Helpers shared by VertexT::computeVertexNormalAngleWeighted() and DCEL::reconcile(). | |
Classes | |
| class | EdgeIteratorT |
| Half-edge iterator class for navigating the half edge mesh. More... | |
| class | EdgeT |
| Half-edge class for navigating a DCEL mesh. More... | |
| class | FaceT |
| Face class for navigating a DCEL mesh. More... | |
| class | MeshT |
| DCEL mesh class - stores a doubly-connected edge mesh. More... | |
| class | ReconcileSchedule |
| Which faces touch each vertex of a mesh, checked and stored once, for DCEL::reconcile(). More... | |
| class | VertexT |
| Vertex class for navigating a DCEL mesh. More... | |
Enumerations | |
| enum class | InsideOutsideAlgorithm { SubtendedAngle , CrossingNumber , WindingNumber } |
| Supported algorithms for testing whether a point projects to the inside of a polygon face. More... | |
Functions | |
| template<class T > | |
| void | reconcile (Pool &a_pool, const MeshT< T > &a_mesh, const ReconcileSchedule &a_schedule) |
Reconcile the copy of a_mesh that lives in a_pool, after its vertices have moved: every face's normal, centroid, area and projection axes, and every half-edge's and vertex's pseudonormal, as MeshT::reconcile() computes them. | |
Namespace containing various double-connected edge list (DCEL) functionality.
DCEL is short for doubly-connected edge list, and is data structure for navigating surface meshes.
|
strong |
Supported algorithms for testing whether a point projects to the inside of a polygon face.
A 3D point projected onto a face's plane lies inside or outside the polygon; the test reduces to 2D by dropping the coordinate of the largest normal component (see FaceT). These are the well-known 2D inside/outside tests.
|
inline |
Reconcile the copy of a_mesh that lives in a_pool, after its vertices have moved: every face's normal, centroid, area and projection axes, and every half-edge's and vertex's pseudonormal, as MeshT::reconcile() computes them.
DCEL::reconcile() reads the arrays.
For vertices that move without changing the mesh's topology. Runs where a_pool's memory is, in three passes, one per face, per half-edge and per vertex: on a device-accessible pool, each pass is one GPU::parallelFor() (device kernels in a CUDA or HIP build, host loops over emulated device memory in a host build); on a host pool, each is a host loop. a_pool is the mesh's own pool or any mirror of it.
In host memory the result is MeshT::reconcile()'s, byte for byte. On a device it agrees to rounding: device compilers fuse multiplies and adds by default, and the device's std::acos differs from the host's in the last bits.
How the vertices were moved is the caller's business (any kernel, any library, a copy from the host), as long as that work has finished: the passes run on the default stream, and reconcile() returns once they are done. One reconcile at a time per schedule and pool: the passes share the schedule's status word in that pool, so two reconciles of the same pool's mesh running at once (from two host threads, say) would race on it. A mesh SDF over the mesh also needs its BVH refitted (BVH::refit()) before it is queried again.
Aborts, in every build, on a schedule built in a pool of another mirror chain or for another mesh, and on the geometry MeshT::reconcile() aborts on, with its message: a vertex and its two neighbors on a face (of non-zero area) with coincident positions. The status word the vertex pass sets is read back after the passes (4 bytes from a device), and only when it is set is the vertex found on the host (in place when the host can read the pool, in a host mirror otherwise). With several such vertices, the message names the first in vertex order, as MeshT::reconcile() does, whatever order the device's threads found them in.
| T | Floating-point precision. |
| [in,out] | a_pool | The pool whose copy of the mesh is reconciled: the mesh's own pool or a mirror. |
| [in] | a_mesh | The mesh, as built (a handle to its own pool). |
| [in] | a_schedule | The schedule built for a_mesh. |