CGAL 6.1 - Dynamic Skeletonization Via Variational Medial Axis Sampling
Loading...
Searching...
No Matches
CGAL::Fast_winding_number< TriangleMesh, FaceNormalMap, FaceAreaMap, FaceCentroidMap, Tree, ORDER, GeomTraits, VertexPointMap > Class Template Reference

#include <CGAL/fast_winding_number.h>

Definition

template<class TriangleMesh, class FaceNormalMap, class FaceAreaMap, class FaceCentroidMap, class Tree, int ORDER = 3, class GeomTraits = Default, class VertexPointMap = Default>
class CGAL::Fast_winding_number< TriangleMesh, FaceNormalMap, FaceAreaMap, FaceCentroidMap, Tree, ORDER, GeomTraits, VertexPointMap >

Fast evaluation of the (normalized) winding number of a triangle mesh.

This class implements a hierarchical (multipole / cluster–far field) approximation of the generalized winding number for a triangle mesh.

Template Parameters
TriangleMesha model of FaceListGraph
FaceNormalMapa readable property map contains the normal of each face: face_descriptor -> Vector_3
FaceAreaMapa readable property map contains the area of each face: face_descriptor -> FT
FaceCentroidMapa readable property map contains the centroid of each face: face_descriptor -> Point_3
Treea built AABB tree over the faces of TriangleMesh
ORDERthe order of the taylor expansion, must be 1, 2, or 3.
Default: 3
GeomTraitsa model of Kernel
Default:
boost::property_traits<
boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type
>::value_type
a model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh_>::vertex_descriptor as key and GeomTraits_::Point_3 as value type.
Default:
boost::property_map<TriangleMesh_, CGAL::vertex_point_t>::const_type.

Public Member Functions

template<class NamedParameters = parameters::Default_named_parameters>
FT evaluate_fast_winding_number (const Point_3 &p, const NamedParameters &np=parameters::default_values())
 computes the fast winding number of a given query point.
 
FT exact_winding_number (const Point_3 &p) const
 computes the exact winding number of a given query point p and the input mesh.
 
bool is_inside (const Point_3 &p)
 tests whether a given query point is inside the input mesh.
 

Constructor

The constructor of a vmas object.

Template Parameters
NamedParametersa sequence of Named Parameters
Parameters
tmeshThe input triangle mesh without borders.
fnmA readable property map that maps each face of tmesh to its normal vector.
famA readable property map that maps each face of tmesh to its area.
fcmA readable property map that maps each face of tmesh to its centroid.
treeA built AABB tree over the faces of tmesh.
npAn optional sequence of Named Parameters, listed below:
Optional Named Parameters
  • a property map associating points to the vertices of pmesh
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, pmesh)
  • The parameter to control the accuracy/speed trade-off of the fast winding number evaluation. little values lead to more accurate results, but slower evaluation.
  • Type: FT
  • Default: FT(2.0)
  • Extra: The range of this parameter is (0,+inf).
template<class NamedParameters = parameters::Default_named_parameters>
 Fast_winding_number (const TriangleMesh &tmesh, const FaceNormalMap &fnm, const FaceAreaMap &fam, const FaceCentroidMap &fcm, Tree &tree, const NamedParameters &np=parameters::default_values())
 

Member Function Documentation

◆ evaluate_fast_winding_number()

template<class TriangleMesh , class FaceNormalMap , class FaceAreaMap , class FaceCentroidMap , class Tree , int ORDER = 3, class GeomTraits = Default, class VertexPointMap = Default>
template<class NamedParameters = parameters::Default_named_parameters>
FT CGAL::Fast_winding_number< TriangleMesh, FaceNormalMap, FaceAreaMap, FaceCentroidMap, Tree, ORDER, GeomTraits, VertexPointMap >::evaluate_fast_winding_number ( const Point_3 &  p,
const NamedParameters &  np = parameters::default_values() 
)

computes the fast winding number of a given query point.

This function computes the fast winding number of a given query point p recursively. For a given query point p, we first compute its distance r to the center of root node in the AABB tree. If r is larger than beta times the radius of the root node, we consider the root node as a single dipole and use the precomputed Taylor expansion coefficients to evaluate the winding number. Otherwise, we traverse down the tree recursively and repeat the same process for each child node.

Parameters
pthe query point
npan optional sequence of Named Parameters, listed below:
Optional Named Parameters
  • The parameter to control the accuracy/speed trade-off of the fast winding number evaluation. little values lead to more accurate results, but slower evaluation.
  • Type: FT
  • Default: FT(2.0)
  • Extra: The range of this parameter is (0,+inf).

Returns
the fast winding number of p

◆ exact_winding_number()

template<class TriangleMesh , class FaceNormalMap , class FaceAreaMap , class FaceCentroidMap , class Tree , int ORDER = 3, class GeomTraits = Default, class VertexPointMap = Default>
FT CGAL::Fast_winding_number< TriangleMesh, FaceNormalMap, FaceAreaMap, FaceCentroidMap, Tree, ORDER, GeomTraits, VertexPointMap >::exact_winding_number ( const Point_3 &  p) const

computes the exact winding number of a given query point p and the input mesh.

Parameters
pthe query point
Returns
the exact winding number of p

◆ is_inside()

template<class TriangleMesh , class FaceNormalMap , class FaceAreaMap , class FaceCentroidMap , class Tree , int ORDER = 3, class GeomTraits = Default, class VertexPointMap = Default>
bool CGAL::Fast_winding_number< TriangleMesh, FaceNormalMap, FaceAreaMap, FaceCentroidMap, Tree, ORDER, GeomTraits, VertexPointMap >::is_inside ( const Point_3 &  p)

tests whether a given query point is inside the input mesh.

Parameters
pthe query point
Returns
true if p is inside the input mesh, false otherwise.