#include <MRCudaFastWindingNumber.h>
|
MRCUDA_API | FastWindingNumber (const Mesh &mesh) |
| constructs this from AABB tree of given mesh;
|
|
MRCUDA_API void | calcFromVector (std::vector< float > &res, const std::vector< Vector3f > &points, float beta, FaceId skipFace={}) override |
| calculates winding numbers in the points from given vector
|
|
MRCUDA_API bool | calcSelfIntersections (FaceBitSet &res, float beta, 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
|
|
MRCUDA_API Expected< void > | calcFromGrid (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float beta, ProgressCallback cb) override |
| calculates winding numbers in each point from a three-dimensional grid
|
|
MRCUDA_API float | calcWithDistances (const Vector3f &p, float windingNumberThreshold, float beta, float maxDistSq, float minDistSq) |
|
MRCUDA_API Expected< void > | calcFromGridWithDistances (std::vector< float > &res, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float windingNumberThreshold, float beta, float maxDistSq, float minDistSq, ProgressCallback cb) override |
| calculates distances with the sign obtained from winding number in each point from a three-dimensional grid
|
|
virtual | ~IFastWindingNumber ()=default |
|
the class for fast approximate computation of winding number for a mesh (using its AABB tree)
◆ FastWindingNumber()
MRCUDA_API MR::Cuda::FastWindingNumber::FastWindingNumber |
( |
const Mesh & | mesh | ) |
|
constructs this from AABB tree of given mesh;
◆ calcFromGrid()
MRCUDA_API Expected< void > MR::Cuda::FastWindingNumber::calcFromGrid |
( |
std::vector< float > & | res, |
|
|
const Vector3i & | dims, |
|
|
const AffineXf3f & | gridToMeshXf, |
|
|
float | beta, |
|
|
ProgressCallback | cb ) |
|
overridevirtual |
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 |
Implements MR::IFastWindingNumber.
◆ calcFromGridWithDistances()
MRCUDA_API Expected< void > MR::Cuda::FastWindingNumber::calcFromGridWithDistances |
( |
std::vector< float > & | res, |
|
|
const Vector3i & | dims, |
|
|
const AffineXf3f & | gridToMeshXf, |
|
|
float | windingNumberThreshold, |
|
|
float | beta, |
|
|
float | maxDistSq, |
|
|
float | minDistSq, |
|
|
ProgressCallback | cb ) |
|
overridevirtual |
calculates distances with the sign obtained from winding number in each point from a three-dimensional grid
- Parameters
-
res | resulting signed distances, will be resized automatically |
dims | dimensions of the grid |
gridToMeshXf | transform from integer grid locations to voxel's centers in mesh reference frame |
windingNumberThreshold | positive distance if winding number below or equal this threshold |
beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
Implements MR::IFastWindingNumber.
◆ calcFromVector()
MRCUDA_API void MR::Cuda::FastWindingNumber::calcFromVector |
( |
std::vector< float > & | res, |
|
|
const std::vector< Vector3f > & | points, |
|
|
float | beta, |
|
|
FaceId | skipFace = {} ) |
|
overridevirtual |
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 |
Implements MR::IFastWindingNumber.
◆ calcSelfIntersections()
MRCUDA_API bool MR::Cuda::FastWindingNumber::calcSelfIntersections |
( |
FaceBitSet & | res, |
|
|
float | beta, |
|
|
ProgressCallback | cb ) |
|
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
- Parameters
-
res | resulting bit set |
beta | determines the precision of the approximation: the more the better, recommended value 2 or more |
- Returns
- false if the operation was canceled by the user
Implements MR::IFastWindingNumber.
◆ calcWithDistances()
MRCUDA_API float MR::Cuda::FastWindingNumber::calcWithDistances |
( |
const Vector3f & | p, |
|
|
float | windingNumberThreshold, |
|
|
float | beta, |
|
|
float | maxDistSq, |
|
|
float | minDistSq ) |
The documentation for this class was generated from the following file: