Antkeeper
0.0.1
|
Marching cubes (MC) algorithm functions and constants. More...
Functions | |
void | polygonize (float *vertices, std::uint8_t *vertex_count, std::int8_t *triangles, std::uint8_t *triangle_count, const float *corners, const float *distances) |
Uses the marching cubes algorithm to polygonize a single cell. More... | |
Variables | |
constexpr float | unit_cube [8][3] |
Vertices of a unit cube. More... | |
Marching cubes (MC) algorithm functions and constants.
void geom::mc::polygonize | ( | float * | vertices, |
std::uint8_t * | vertex_count, | ||
std::int8_t * | triangles, | ||
std::uint8_t * | triangle_count, | ||
const float * | corners, | ||
const float * | distances | ||
) |
Uses the marching cubes algorithm to polygonize a single cell.
[out] | vertices | Array which can hold at least 12 vertices (36 floats). |
[out] | vertex_count | Number of generated vertices. |
[out] | triangles | Array which can hold 5 at least triangles (15 ints). |
[out] | triangle_count | Number of generated triangles. The maximum number triangles generated for a single cell is 5. |
Definition at line 338 of file marching-cubes.cpp.
|
constexpr |
Vertices of a unit cube.
Definition at line 43 of file marching-cubes.hpp.