#include <MRFastWindingNumber.h>
Inheritance diagram for MR::FastWindingNumber:Public Member Functions | |
| MRMESH_API | FastWindingNumber (const Mesh &mesh) |
| MRMESH_API Expected< void > | calcFromVector (std::vector< float > &res, const std::vector< Vector3f > &points, float beta, FaceId skipFace, const ProgressCallback &cb) override |
| calculates winding numbers in the points from given vector | |
| MRMESH_API Expected< void > | calcSelfIntersections (FaceBitSet &res, float beta, const ProgressCallback &cb) override |
| 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 | |
| MRMESH_API Expected< void > | calcFromGrid (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float beta, const ProgressCallback &cb) override |
| calculates winding numbers in each point from a three-dimensional grid | |
| MRMESH_API float | calcWithDistances (const Vector3f &p, const DistanceToMeshOptions &options) |
| MRMESH_API Expected< void > | calcFromGridWithDistances (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, const DistanceToMeshOptions &options, const ProgressCallback &cb) override |
| 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 | |
Public Member Functions inherited from MR::IFastWindingNumber | |
| virtual | ~IFastWindingNumber ()=default |
the class for fast approximate computation of winding number for a mesh (using its AABB tree)
Note, this used to be [[nodiscard]], but GCC 12 doesn't understand both [[...]] and __attribute__(...) on the same class. A possible fix is to change MRMESH_CLASS globally to [[__gnu__::__visibility__("default")]].
|
nodiscard |
constructs this from AABB tree of given mesh; this remains valid only if tree is valid
|
overridevirtual |
calculates winding numbers in each point from a three-dimensional grid
| 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 |
Implements MR::IFastWindingNumber.
|
overridevirtual |
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
| res | resulting signed distances, will be resized automatically |
| dims | dimensions of the grid |
Implements MR::IFastWindingNumber.
|
overridevirtual |
calculates winding numbers in the points from given vector
| 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 |
Implements MR::IFastWindingNumber.
|
overridevirtual |
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
| res | resulting bit set |
| beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
Implements MR::IFastWindingNumber.
| MRMESH_API float MR::FastWindingNumber::calcWithDistances | ( | const Vector3f & | p, |
| const DistanceToMeshOptions & | options ) |