MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::IFastWindingNumberByParts Class Referenceabstract

Abstract class that complements IFastWindingNumber with chunked processing variants of its methods. More...

#include <MRFastWindingNumber.h>

+ Inheritance diagram for MR::IFastWindingNumberByParts:

Public Types

using GridByPartsFunc = std::function<Expected<void> ( std::vector<float>&& data, const Vector3i& dims, int zOffset )>
 

Public Member Functions

virtual ~IFastWindingNumberByParts ()=default
 
virtual Expected< void > calcFromGridByParts (GridByPartsFunc resFunc, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float beta, int layerOverlap, const ProgressCallback &cb)=0
 calculates winding numbers in each point from a three-dimensional grid
 
virtual Expected< void > calcFromGridWithDistancesByParts (GridByPartsFunc resFunc, const Vector3i &dims, const AffineXf3f &gridToMeshXf, const DistanceToMeshOptions &options, int layerOverlap, 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
 

Detailed Description

Abstract class that complements IFastWindingNumber with chunked processing variants of its methods.

Member Typedef Documentation

◆ GridByPartsFunc

using MR::IFastWindingNumberByParts::GridByPartsFunc = std::function<Expected<void> ( std::vector<float>&& data, const Vector3i& dims, int zOffset )>

callback that gets a block of resulting winding numbers

Parameters
data- block data
dims- block dimensions
zOffset- block offset in XY dimension

Constructor & Destructor Documentation

◆ ~IFastWindingNumberByParts()

virtual MR::IFastWindingNumberByParts::~IFastWindingNumberByParts ( )
virtualdefault

Member Function Documentation

◆ calcFromGridByParts()

virtual Expected< void > MR::IFastWindingNumberByParts::calcFromGridByParts ( GridByPartsFunc resFunc,
const Vector3i & dims,
const AffineXf3f & gridToMeshXf,
float beta,
int layerOverlap,
const ProgressCallback & cb )
pure virtual

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

Parameters
resFunccallback that gets a block of resulting winding numbers
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
layerOverlapoverlap between two blocks of the grid, set as XY layer count

Implemented in MR::Cuda::FastWindingNumber.

◆ calcFromGridWithDistancesByParts()

virtual Expected< void > MR::IFastWindingNumberByParts::calcFromGridWithDistancesByParts ( GridByPartsFunc resFunc,
const Vector3i & dims,
const AffineXf3f & gridToMeshXf,
const DistanceToMeshOptions & options,
int layerOverlap,
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
resFunccallback that gets a block of resulting winding numbers
dimsdimensions of the grid
gridToMeshXftransform from integer grid locations to voxel's centers in mesh reference frame
layerOverlapoverlap between two blocks of the grid, set as XY layer count

Implemented in MR::Cuda::FastWindingNumber.


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