MeshLib
 
Loading...
Searching...
No Matches
Voxel Path

Classes

struct  MR::VoxelMetricParameters
 Parameters for building metric function. More...
 

Typedefs

using MR::VoxelsMetric = std::function<float( size_t from, size_t to )>
 

Enumerations

enum class  MR::QuarterBit : char {
  MR::QuarterBit::LeftLeft = 0b1 , MR::QuarterBit::LeftRight = 0b10 , MR::QuarterBit::RightLeft = 0b100 , MR::QuarterBit::RightRight = 0b1000 ,
  MR::QuarterBit::All = 0b1111
}
 
enum  MR::SlicePlane { MR::YZ , MR::ZX , MR::XY , MR::None }
 Plane of slice in which to find path. More...
 

Functions

MRMESH_API VoxelsMetric MR::voxelsExponentMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters, float modifier=-1.0f)
 e^(modifier*(dens1+dens2))
 
MRMESH_API VoxelsMetric MR::voxelsSumDiffsMetric (const VdbVolume &voxels, const VoxelMetricParameters &parameters)
 sum of dense differences with start and stop voxels
 
MRMESH_API std::vector< size_t > MR::buildSmallestMetricPath (const VdbVolume &voxels, const VoxelsMetric &metric, size_t start, size_t finish, ProgressCallback cb={})
 builds shortest path in given metric from start to finish voxels; if no path can be found then empty path is returned
 

Detailed Description

Typedef Documentation

◆ VoxelsMetric

using MR::VoxelsMetric = std::function<float( size_t from, size_t to )>

Enumeration Type Documentation

◆ QuarterBit

enum class MR::QuarterBit : char
strong
Enumerator
LeftLeft 
LeftRight 
RightLeft 
RightRight 
All 

◆ SlicePlane

Plane of slice in which to find path.

Enumerator
YZ 

= 0 cause main axis is x - [0]

ZX 

= 1 cause main axis is y - [1]

XY 

= 2 cause main axis is z - [2]

None 

special value not to limit path in one slice

Function Documentation

◆ buildSmallestMetricPath()

MRMESH_API std::vector< size_t > MR::buildSmallestMetricPath ( const VdbVolume & voxels,
const VoxelsMetric & metric,
size_t start,
size_t finish,
ProgressCallback cb = {} )
nodiscard

builds shortest path in given metric from start to finish voxels; if no path can be found then empty path is returned

◆ voxelsExponentMetric()

MRMESH_API VoxelsMetric MR::voxelsExponentMetric ( const VdbVolume & voxels,
const VoxelMetricParameters & parameters,
float modifier = -1.0f )
nodiscard

e^(modifier*(dens1+dens2))

◆ voxelsSumDiffsMetric()

MRMESH_API VoxelsMetric MR::voxelsSumDiffsMetric ( const VdbVolume & voxels,
const VoxelMetricParameters & parameters )
nodiscard

sum of dense differences with start and stop voxels