Template Function gamer::marchingCubes

Function Documentation

template<typename NumType, typename = std::enable_if_t<std::is_arithmetic<NumType>::value>, class Inserter>
std::unique_ptr<SurfaceMesh> gamer::marchingCubes(NumType *dataset, NumType maxval, const Vector3i &dim, const Vector3f &span, NumType isovalue, Inserter holelist)

Marching cubes algorithm.

Parameters
  • dataset – Voxel array to mesh

  • maxval[in] Maximum value in the dataset

  • dim[in] Dimension of the dataset

  • span[in] Real space size of a voxel

  • isovalue[in] Isovalue to contour at

  • holelist[in] Inserter to append holes

Template Parameters
  • NumType – Numerical typename

  • <unnamed> – Check to ensure NumType is numerical

  • Inserter – Typename of the inserter

Returns

Surface mesh