MeshLib
 
Loading...
Searching...
No Matches
MR::MarchingCubesByParts Class Reference

#include <MRMarchingCubes.h>

Public Member Functions

MRVOXELS_API MarchingCubesByParts (const Vector3i &dims, const MarchingCubesParams &params, int layersPerBlock=0)
 
MRVOXELS_API ~MarchingCubesByParts ()
 
MRVOXELS_API MarchingCubesByParts (MarchingCubesByParts &&s) noexcept
 
MRVOXELS_API MarchingCubesByPartsoperator= (MarchingCubesByParts &&s) noexcept
 
MRVOXELS_API int layersPerBlock () const
 the number of z-slices of the volume in the blocks
 
MRVOXELS_API int nextZ () const
 the last z-layer of the previous part and the first z-layer of the next part
 
MRVOXELS_API Expected< void > addPart (const SimpleVolume &part)
 adds one more part of volume into consideration, with first z=nextZ()
 
MRVOXELS_API Expected< TriMeshfinalize ()
 finishes processing and outputs produced trimesh
 

Detailed Description

converts volume split on parts by planes z=const into mesh, last z-layer of previous part must be repeated as first z-layer of next part usage: MarchingCubesByParts x( dims, params); x.addPart( part1 ); ... x.addPart( partN ); Mesh mesh = Mesh::fromTriMesh( *x.finalize() );

Constructor & Destructor Documentation

◆ MarchingCubesByParts() [1/2]

MRVOXELS_API MR::MarchingCubesByParts::MarchingCubesByParts ( const Vector3i & dims,
const MarchingCubesParams & params,
int layersPerBlock = 0 )
explicit

prepares convention for given volume dimensions and given parameters

Parameters
layersPerBlockall z-slices of the volume will be partitioned on blocks of given size to process blocks in parallel (0 means auto-select layersPerBlock)

◆ ~MarchingCubesByParts()

MRVOXELS_API MR::MarchingCubesByParts::~MarchingCubesByParts ( )

◆ MarchingCubesByParts() [2/2]

MRVOXELS_API MR::MarchingCubesByParts::MarchingCubesByParts ( MarchingCubesByParts && s)
noexcept

Member Function Documentation

◆ addPart()

MRVOXELS_API Expected< void > MR::MarchingCubesByParts::addPart ( const SimpleVolume & part)

adds one more part of volume into consideration, with first z=nextZ()

◆ finalize()

MRVOXELS_API Expected< TriMesh > MR::MarchingCubesByParts::finalize ( )

finishes processing and outputs produced trimesh

◆ layersPerBlock()

MRVOXELS_API int MR::MarchingCubesByParts::layersPerBlock ( ) const

the number of z-slices of the volume in the blocks

◆ nextZ()

MRVOXELS_API int MR::MarchingCubesByParts::nextZ ( ) const

the last z-layer of the previous part and the first z-layer of the next part

◆ operator=()

MRVOXELS_API MarchingCubesByParts & MR::MarchingCubesByParts::operator= ( MarchingCubesByParts && s)
noexcept

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