The surface class convertes a tile::accessor to an iso-surface. Call this class by one thread at a time. Uses marching cubes and transvoxel for surface-generation. http://www.terathon.com/voxels/ To understand this class and algos please read Eric Lengyel’s Dissertation: http://www.terathon.com/lengyel/Lengyel-VoxelTerrain.pdf . If you got a custom voxel, that effects the resulting surface derive this class and reimplement vertexGotCreated() and vertexGotCreatedLod(). Private methods are undocumentated because they simply implement the code described in Eric Lengyel’s Dissertation.
More...
#include <surface.hpp>
template<class configType>
class blub::procedural::voxel::tile::surface< configType >
The surface class convertes a tile::accessor to an iso-surface. Call this class by one thread at a time. Uses marching cubes and transvoxel for surface-generation. http://www.terathon.com/voxels/ To understand this class and algos please read Eric Lengyel’s Dissertation: http://www.terathon.com/lengyel/Lengyel-VoxelTerrain.pdf . If you got a custom voxel, that effects the resulting surface derive this class and reimplement vertexGotCreated() and vertexGotCreatedLod(). Private methods are undocumentated because they simply implement the code described in Eric Lengyel’s Dissertation.
- Examples:
- customVertexInformation.cpp.
template<class configType >
calculateSurface calculates the iso surface.
- Parameters
-
voxel | Contains the voxel needed for the surface calculation. |
voxelSize | voxel-scale. |
calculateNormalCorrection | check chapter 3.3 in Eric Lengyel’s Dissertation. |
lod | Lod index starting with 0. |
template<class configType >
create creates an instance.
- Returns
- never nullptr.
template<class configType >
createCopy copies an instance.
- Parameters
-
- Returns
- never nullptr.
template<class configType >
template<class configType >
does the transvoxel algo get applied.
- Returns
template<class configType >
getIndices returns resulting index-list.
- Returns
template<class configType >
getPositions returns resulting transvoxel-list. Vertices for these indices are in getPositions() and getNormals().
- Returns
template<class configType >
getPositions returns resulting position-list.
- Returns
The documentation for this class was generated from the following files:
- /home/mlanner/Development/cpp/projects/voxelTerrain/voxelTerrain/modules/procedural/source/blub/procedural/predecl.hpp
- /home/mlanner/Development/cpp/projects/voxelTerrain/voxelTerrain/modules/procedural/source/blub/procedural/voxel/tile/surface.hpp