Marching Cubes

API

struct Triangle

simple tructure that represents a triangle in 3D

Public Members

real3 a

vertex 0

real3 b

vertex 1

real3 c

vertex 2

void mirheo::marching_cubes::computeTriangles(DomainInfo domain, real3 resolution, const ImplicitSurfaceFunction &surface, std::vector<Triangle> &triangles)

Create an explicit surface (triangles) from implicit surface (scalar field) using marching cubes.

Parameters
  • domain: Domain information
  • resolution: the number of grid points in each direction
  • surface: The scalar field that represents implicitly the surface (0 levelset)
  • triangles: The explicit surface representation