SPH
|
Marching cubes algorithm for generation of mesh from iso-surface of given scalar field. More...
#include <MarchingCubes.h>
Public Member Functions | |
MarchingCubes (IScheduler &scheduler, const Float surfaceLevel, const SharedPtr< IScalarField > &field, Function< bool(Float progress)> progressCallback=nullptr) | |
Constructs the object using given scalar field. More... | |
void | addComponent (const Box &box, const Float gridResolution) |
Adds a triangle mesh representing the boundary of particles. More... | |
INLINE Array< Triangle > & | getTriangles () & |
Returns the generated triangles. More... | |
INLINE Array< Triangle > | getTriangles () && |
Returns the generated triangles. More... | |
Marching cubes algorithm for generation of mesh from iso-surface of given scalar field.
Definition at line 39 of file MarchingCubes.h.
MarchingCubes::MarchingCubes | ( | IScheduler & | scheduler, |
const Float | surfaceLevel, | ||
const SharedPtr< IScalarField > & | field, | ||
Function< bool(Float progress)> | progressCallback = nullptr |
||
) |
Constructs the object using given scalar field.
scheduler | Scheduler used for parallelization |
surfaceLevel | Defines of the boundary of SPH particle as implicit function \( {\rm Boundary} = \Phi(\vec r) - {\rm surfaceLevel}\), where \(\Phi\) is the scalar field. |
field | Scalar field used to generate the surface. |
Definition at line 329 of file MarchingCubes.cpp.
Adds a triangle mesh representing the boundary of particles.
Particles are specified by the given bounding box. The generated mesh is added into the internal triangle buffer.
box | Selected bounding box |
gridResolution | Absolute size of the grid |
Definition at line 338 of file MarchingCubes.cpp.
Returns the generated triangles.
Definition at line 84 of file MarchingCubes.h.
Returns the generated triangles.
Definition at line 89 of file MarchingCubes.h.
Values of the scalar field defining the surface.
Definition at line 55 of file MarchingCubes.h.