Wildmeshing Toolkit
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
wmtk::utils::WindingNumberHierarchy Class Reference

The hierarchy libigl's winding_number(V, F, O, W) evaluates a triangle mesh with – igl::WindingNumberAABB, exact method – made deterministic and self-contained. More...

#include <WindingNumberHierarchy.hpp>

Classes

struct  Node
 

Public Member Functions

 WindingNumberHierarchy (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F)
 
double winding_number (const Eigen::RowVector3d &p) const
 Winding number of p with respect to the mesh.
 

Private Member Functions

int add_node (Eigen::MatrixXi F)
 
void grow (const int node)
 WindingNumberAABB::grow with the median split.
 
bool inside (const Node &n, const Eigen::RowVector3d &p) const
 
double node_winding_number (const int node, const Eigen::RowVector3d &p) const
 WindingNumberTree::winding_number, exact method.
 

Static Private Member Functions

static Eigen::MatrixXi cap_of (const Eigen::MatrixXi &F)
 igl::triangle_fan(igl::exterior_edges(F)), with a fixed apex instead of a random one.
 

Private Attributes

Eigen::MatrixXd m_V
 
std::vector< Node > m_nodes
 

Static Private Attributes

static constexpr Eigen::Index kMinFaces = 100
 Fewest faces a node is split at, as igl's WindingNumberAABB_MIN_F.
 

Detailed Description

The hierarchy libigl's winding_number(V, F, O, W) evaluates a triangle mesh with – igl::WindingNumberAABB, exact method – made deterministic and self-contained.

The algorithm is igl's, step for step: exact duplicate vertices merged, nodes split at the median face barycenter along the box's longest axis down to 100 faces, and a query outside a node's box answered from the node's boundary, closed by a fan, when that is cheaper than its faces. Two things differ:

winding_number(p) is const and touches no shared state, so a hierarchy can be queried from any number of threads at once.


The documentation for this class was generated from the following file: