Abstract class for fast approximate computation of generalized winding number for a mesh (using its AABB tree)
More...
#include <MRFastWindingNumber.h>
|
virtual | ~IFastWindingNumber ()=default |
|
virtual Expected< void > | calcFromVector (std::vector< float > &res, const std::vector< Vector3f > &points, float beta, FaceId skipFace={}, const ProgressCallback &cb={})=0 |
| calculates winding numbers in the points from given vector
|
|
virtual Expected< void > | calcSelfIntersections (FaceBitSet &res, float beta, const ProgressCallback &cb={})=0 |
| 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
|
|
virtual Expected< void > | calcFromGrid (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float beta, const ProgressCallback &cb={})=0 |
| calculates winding numbers in each point from a three-dimensional grid
|
|
virtual Expected< void > | calcFromGridWithDistances (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, const DistanceToMeshOptions &options, const ProgressCallback &cb)=0 |
| 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
|
|
Abstract class for fast approximate computation of generalized winding number for a mesh (using its AABB tree)
◆ ~IFastWindingNumber()
virtual MR::IFastWindingNumber::~IFastWindingNumber |
( |
| ) |
|
|
virtualdefault |
◆ calcFromGrid()
virtual Expected< void > MR::IFastWindingNumber::calcFromGrid |
( |
std::vector< float > & | res, |
|
|
const Vector3i & | dims, |
|
|
const AffineXf3f & | gridToMeshXf, |
|
|
float | beta, |
|
|
const ProgressCallback & | cb = {} ) |
|
pure virtual |
calculates winding numbers in each point from a three-dimensional grid
- Parameters
-
res | resulting winding numbers, will be resized automatically |
dims | dimensions of the grid |
gridToMeshXf | transform from integer grid locations to voxel's centers in mesh reference frame |
beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
Implemented in MR::Cuda::FastWindingNumber, and MR::FastWindingNumber.
◆ calcFromGridWithDistances()
virtual Expected< void > MR::IFastWindingNumber::calcFromGridWithDistances |
( |
std::vector< float > & | res, |
|
|
const Vector3i & | dims, |
|
|
const AffineXf3f & | gridToMeshXf, |
|
|
const DistanceToMeshOptions & | options, |
|
|
const ProgressCallback & | cb ) |
|
pure virtual |
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
-
res | resulting signed distances, will be resized automatically |
dims | dimensions of the grid |
Implemented in MR::Cuda::FastWindingNumber, and MR::FastWindingNumber.
◆ calcFromVector()
virtual Expected< void > MR::IFastWindingNumber::calcFromVector |
( |
std::vector< float > & | res, |
|
|
const std::vector< Vector3f > & | points, |
|
|
float | beta, |
|
|
FaceId | skipFace = {}, |
|
|
const ProgressCallback & | cb = {} ) |
|
pure virtual |
calculates winding numbers in the points from given vector
- Parameters
-
res | resulting winding numbers, will be resized automatically |
points | incoming points |
beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
skipFace | this triangle (if it is close to q ) will be skipped from summation |
Implemented in MR::Cuda::FastWindingNumber, and MR::FastWindingNumber.
◆ calcSelfIntersections()
virtual Expected< void > MR::IFastWindingNumber::calcSelfIntersections |
( |
FaceBitSet & | res, |
|
|
float | beta, |
|
|
const ProgressCallback & | cb = {} ) |
|
pure virtual |
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
-
res | resulting bit set |
beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
Implemented in MR::Cuda::FastWindingNumber, and MR::FastWindingNumber.
The documentation for this class was generated from the following file: