MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::IFastWindingNumber Struct Reference
Inheritance diagram for meshlib::IFastWindingNumber:

Public Member Functions

auto calc_from_vector (res:&mut meshlib::std_vector_float, points:&meshlib::std_vector_MR_Vector3f, beta:f32, skipFace:Option<&meshlib::FaceId >, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::expected_void_std_string >
auto calc_self_intersections (res:&mut meshlib::FaceBitSet, beta:f32, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::expected_void_std_string >
auto calc_from_grid (res:&mut meshlib::std_vector_float, dims:&meshlib::Vector3i, gridToMeshXf:&meshlib::AffineXf3f, beta:f32, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::expected_void_std_string >
auto calc_from_grid_with_distances (res:&mut meshlib::VoxelScalars, dims:&meshlib::Vector3i, gridToMeshXf:&meshlib::AffineXf3f, options:&meshlib::DistanceToMeshOptions, cb:&meshlib::std_function_bool_from_float) -> meshlib::Owned< meshlib::expected_void_std_string >

Additional Inherited Members

Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)

Detailed Description

Abstract class for fast approximate computation of generalized winding number for a mesh (using its AABB tree) Generated from class MR::IFastWindingNumber. Derived classes: Direct: (non-virtual) MR::Cuda::FastWindingNumber MR::FastWindingNumber

Generated from class MR::IFastWindingNumber. Heap-allocated instances are held in Owned<IFastWindingNumber>.

Member Function Documentation

◆ calc_from_grid()

auto meshlib::IFastWindingNumber::calc_from_grid ( res:&mut meshlib::std_vector_float ,
dims:&meshlib::Vector3i ,
gridToMeshXf:&meshlib::AffineXf3f ,
beta:f32 ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::expected_void_std_string >

calculates winding numbers in each point from a three-dimensional grid

Parameters
resresulting winding numbers, will be resized automatically
dimsdimensions of the grid
gridToMeshXftransform from integer grid locations to voxel's centers in mesh reference frame
betadetermines the precision of the approximation: the more the better, recommended value 2 or more Generated from method MR::IFastWindingNumber::calcFromGrid.

Calls MR_IFastWindingNumber_calcFromGrid().

◆ calc_from_grid_with_distances()

auto meshlib::IFastWindingNumber::calc_from_grid_with_distances ( res:&mut meshlib::VoxelScalars ,
dims:&meshlib::Vector3i ,
gridToMeshXf:&meshlib::AffineXf3f ,
options:&meshlib::DistanceToMeshOptions ,
cb:&meshlib::std_function_bool_from_float  ) -> meshlib::Owned< meshlib::expected_void_std_string >

calculates distances with the sign obtained from generalized winding number in each point from a three-dimensional grid; if sqr(res) < minDistSq or sqr(res) >= maxDistSq, then NaN is returned for such point

Parameters
resresulting signed distances, will be resized automatically
dimsdimensions of the grid Generated from method MR::IFastWindingNumber::calcFromGridWithDistances.

Calls MR_IFastWindingNumber_calcFromGridWithDistances().

◆ calc_from_vector()

auto meshlib::IFastWindingNumber::calc_from_vector ( res:&mut meshlib::std_vector_float ,
points:&meshlib::std_vector_MR_Vector3f ,
beta:f32 ,
skipFace:Option<&meshlib::FaceId > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::expected_void_std_string >

calculates winding numbers in the points from given vector

Parameters
resresulting winding numbers, will be resized automatically
pointsincoming points
betadetermines the precision of the approximation: the more the better, recommended value 2 or more
skipFacethis triangle (if it is close to q) will be skipped from summation Generated from method MR::IFastWindingNumber::calcFromVector.

Calls MR_IFastWindingNumber_calcFromVector().

◆ calc_self_intersections()

auto meshlib::IFastWindingNumber::calc_self_intersections ( res:&mut meshlib::FaceBitSet ,
beta:f32 ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::expected_void_std_string >

calculates winding numbers for all centers of mesh's triangles. if winding number is less than 0 or greater then 1, that face is marked as self-intersected

Parameters
resresulting bit set
betadetermines the precision of the approximation: the more the better, recommended value 2 or more Generated from method MR::IFastWindingNumber::calcSelfIntersections.

Calls MR_IFastWindingNumber_calcSelfIntersections().


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