MeshLib C++ Docs
Loading...
Searching...
No Matches
MRWeightedPointsShell.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRVoxelsFwd.h"
5#include "MRMesh/MRExpected.h"
8#include "MRMesh/MRBitSet.h"
9#include "MRPch/MRBindingMacros.h"
10
11namespace MR
12{
13
24
27
29[[nodiscard]] MRVOXELS_API FunctionVolume weightedMeshToDistanceFunctionVolume( const Mesh & mesh, const WeightedPointsToDistanceVolumeParams& params );
30
32{
34 float offset = 0;
35
38 float voxelSize = 0;
39
44
47
48
49 // To allow passing Python lambdas into `dist.pointWeight`.
50 MR_BIND_PREFER_UNLOCK_GIL_WHEN_USED_AS_PARAM
51};
52
58
60{
61 struct Region
62 {
63 VertBitSet verts;
64 float weight = 0.f;
65 };
66
69 std::vector<Region> regions;
70
74};
75
79// MR_BIND_IGNORE to hide this function in Python API because calling Python's Lambda will be extremely slow anyway
80[[nodiscard]] MR_BIND_IGNORE MRVOXELS_API Expected<Mesh> weightedPointsShell( const PointCloud & cloud, const WeightedPointsShellParametersMetric& params );
81
85[[nodiscard]] MRVOXELS_API Expected<Mesh> weightedPointsShell( const PointCloud & cloud, const VertScalars& pointWeights, const WeightedPointsShellParametersMetric& params );
86
90// MR_BIND_IGNORE to hide this function in Python API because calling Python's Lambda will be extremely slow anyway
91[[nodiscard]] MR_BIND_IGNORE MRVOXELS_API Expected<Mesh> weightedMeshShell( const Mesh & mesh, const WeightedPointsShellParametersMetric& params );
92
96[[nodiscard]] MRVOXELS_API Expected<Mesh> weightedMeshShell( const Mesh & mesh, const VertScalars& vertWeights, const WeightedPointsShellParametersMetric& params );
97
100 const Mesh& mesh, const std::vector<WeightedPointsShellParametersRegions::Region>& regions, float interpolationDist );
101
104
105} //namespace MR
#define MRVOXELS_API
Definition MRVoxels/MRVoxelsFwd.h:13
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:641
tl::expected< T, E > Expected
Definition MRExpected.h:59
MR_BIND_IGNORE MRVOXELS_API Expected< Mesh > weightedMeshShell(const Mesh &mesh, const WeightedPointsShellParametersMetric &params)
MRVOXELS_API FunctionVolume weightedMeshToDistanceFunctionVolume(const Mesh &mesh, const WeightedPointsToDistanceVolumeParams &params)
makes FunctionVolume representing minimal distance to mesh with weighted vertices
MRVOXELS_API FunctionVolume weightedPointsToDistanceFunctionVolume(const PointCloud &cloud, const WeightedPointsToDistanceVolumeParams &params)
makes FunctionVolume representing minimal distance to weighted points
MR_BIND_IGNORE MRVOXELS_API Expected< Mesh > weightedPointsShell(const PointCloud &cloud, const WeightedPointsShellParametersMetric &params)
MRVOXELS_API VertScalars calculateShellWeightsFromRegions(const Mesh &mesh, const std::vector< WeightedPointsShellParametersRegions::Region > &regions, float interpolationDist)
interpolate set of regions and assign weight to each vertex of the mesh
Definition MRClosestWeightedPoint.h:56
Definition MRClosestWeightedPoint.h:38
Definition MRDistanceVolumeParams.h:10
Definition MRMesh/MRMesh.h:22
Definition MRMesh/MRPointCloud.h:16
Definition MRWeightedPointsShell.h:32
float offset
build iso-surface of minimal distance to points corresponding to this value
Definition MRWeightedPointsShell.h:34
bool signDistanceByNormal
Definition MRWeightedPointsShell.h:43
ProgressCallback progress
Progress callback.
Definition MRWeightedPointsShell.h:46
float voxelSize
Definition MRWeightedPointsShell.h:38
Definition MRWeightedPointsShell.h:54
DistanceFromWeightedPointsParams dist
parameters of distance finding
Definition MRWeightedPointsShell.h:56
Definition MRWeightedPointsShell.h:62
float weight
Definition MRWeightedPointsShell.h:64
VertBitSet verts
Definition MRWeightedPointsShell.h:63
Definition MRWeightedPointsShell.h:60
float interpolationDist
Definition MRWeightedPointsShell.h:73
std::vector< Region > regions
Definition MRWeightedPointsShell.h:69
Definition MRWeightedPointsShell.h:15
DistanceFromWeightedPointsComputeParams dist
Definition MRWeightedPointsShell.h:18
DistanceVolumeParams vol
Definition MRWeightedPointsShell.h:16
bool signDistanceByNormal
Definition MRWeightedPointsShell.h:22