MeshLib C++ Docs
Loading...
Searching...
No Matches
MRCudaFastWindingNumber.h
Go to the documentation of this file.
1#pragma once
2#include "exports.h"
4#include "MRMesh/MRMesh.h"
5#include "MRMesh/MRDistanceToMeshOptions.h" // only for bindings generation
6
7namespace MR
8{
9
10namespace Cuda
11{
12
13struct FastWindingNumberDataBuffers;
14
18{
19 const Mesh & mesh_;
20 std::shared_ptr<FastWindingNumberDataBuffers> data_;
21
22public:
24 MRCUDA_API FastWindingNumber( const Mesh& mesh );
25
26 // see methods' descriptions in IFastWindingNumber
27 MRCUDA_API Expected<void> calcFromVector( std::vector<float>& res, const std::vector<Vector3f>& points, float beta, FaceId skipFace, const ProgressCallback& cb ) override;
28 MRCUDA_API Expected<void> calcSelfIntersections( FaceBitSet& res, float beta, const ProgressCallback& cb ) override;
29 MRCUDA_API Expected<void> calcFromGrid( std::vector<float>& res, const Vector3i& dims, const AffineXf3f& gridToMeshXf, float beta, const ProgressCallback& cb ) override;
30 MRCUDA_API Expected<void> calcFromGridWithDistances( std::vector<float>& res, const Vector3i& dims, const AffineXf3f& gridToMeshXf, const DistanceToMeshOptions& options, const ProgressCallback& cb ) override;
31
32 // see methods' descriptions in IFastWindingNumberByParts
33 MRCUDA_API Expected<void> calcFromGridByParts( GridByPartsFunc resFunc, const Vector3i& dims, const AffineXf3f& gridToMeshXf, float beta, int layerOverlap, const ProgressCallback& cb ) override;
34 MRCUDA_API Expected<void> calcFromGridWithDistancesByParts( GridByPartsFunc resFunc, const Vector3i& dims, const AffineXf3f& gridToMeshXf, const DistanceToMeshOptions& options, int layerOverlap, const ProgressCallback& cb ) override;
35
36private:
37 Expected<void> prepareData_( ProgressCallback cb );
38};
39
40} // namespace Cuda
41} // namespace MR
Definition MRCudaFastWindingNumber.h:18
MRCUDA_API Expected< void > calcFromGridByParts(GridByPartsFunc resFunc, const Vector3i &dims, const AffineXf3f &gridToMeshXf, float beta, int layerOverlap, const ProgressCallback &cb) override
calculates winding numbers in each point from a three-dimensional grid
MRCUDA_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 g...
MRCUDA_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
MRCUDA_API Expected< void > calcFromGridWithDistancesByParts(GridByPartsFunc resFunc, const Vector3i &dims, const AffineXf3f &gridToMeshXf, const DistanceToMeshOptions &options, int layerOverlap, const ProgressCallback &cb) override
calculates distances with the sign obtained from generalized winding number in each point from a thre...
MRCUDA_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
MRCUDA_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 thre...
MRCUDA_API FastWindingNumber(const Mesh &mesh)
constructs this from AABB tree of given mesh;
Definition MRDistanceToMeshOptions.h:11
Definition MRFastWindingNumber.h:78
Definition MRFastWindingNumber.h:12
Definition MRMesh/MRMesh.h:23
Definition MRCameraOrientationPlugin.h:8