The accessor class caches all voxel needed by tile::surface for an extremly optimized and fast calculation for the same. This class looks up all voxel needed for the modified marching cubes and if lod is enabled 6*arrays for every side of the cube (transvoxel). See http://www.terathon.com/voxels/ and http://www.terathon.com/lengyel/Lengyel-VoxelTerrain.pdf.
More...
#include <accessor.hpp>
|
static constexpr int32 | voxelLength = t_config::voxelsPerTile |
|
static constexpr int32 | voxelLengthWithNormalCorrection = voxelLength+3 |
|
static constexpr int32 | voxelLengthLod = (voxelLength+1)*2 |
|
static constexpr int32 | voxelCount = voxelLengthWithNormalCorrection*voxelLengthWithNormalCorrection*voxelLengthWithNormalCorrection |
|
static constexpr int32 | voxelCountLod = voxelLengthLod*voxelLengthLod |
|
static constexpr int32 | voxelCountLodAll = 6*voxelCountLod |
|
static constexpr int32 | voxelLengthSurface = t_config::voxelsPerTile+1 |
|
static constexpr int32 | voxelCountSurface = voxelLengthSurface*voxelLengthSurface*voxelLengthSurface |
|
template<class configType>
class blub::procedural::voxel::tile::accessor< configType >
The accessor class caches all voxel needed by tile::surface for an extremly optimized and fast calculation for the same. This class looks up all voxel needed for the modified marching cubes and if lod is enabled 6*arrays for every side of the cube (transvoxel). See http://www.terathon.com/voxels/ and http://www.terathon.com/lengyel/Lengyel-VoxelTerrain.pdf.
template<class configType >
template<class configType >
create creates an instance.
- Returns
- Never nullptr.
template<class configType >
getCalculateLod returns true if surface later shall calculate level-of-detail
- Returns
template<class configType >
template<class configType >
getNumVoxelLargerZeroLod returns number of voxel in lod not minimum.
- Returns
template<class configType >
getVoxel return ref to voxel.
- Parameters
-
pos | -1 <= pos.xyz < voxelLengthWithNormalCorrection-1 |
- Returns
template<class configType >
getVoxelArray return voxel-array
- Returns
template<class configType >
getVoxelArray return voxel-array
- Returns
template<class configType >
getVoxelArrayLod returns nullptr if no lod shall get calculated else 6-lod-arrays of voxels.
- Returns
- See also
- getCalculateLod()
template<class configType >
getVoxelArrayLod returns nullptr if no lod shall get calculated else 6-lod-arrays of voxels.
- Returns
- returns
- See also
- getCalculateLod()
template<class configType >
getVoxelLod returns ref to lod-voxel
- Parameters
-
pos | |
lod | level of detail index |
- Returns
- See also
- calculateCoordsLod()
template<class configType >
template<class configType >
template<class configType >
template<class configType >
setCalculateLod enables or disables lod calculation and voxel buffering for it.
- Parameters
-
template<class configType >
setNumVoxelLargerZero internally used for extern sync. (optimisation)
- Parameters
-
template<class configType >
setNumVoxelLargerZero internally used for extern sync. (optimisation)
- Parameters
-
template<class configType >
setVoxel set ancalculateIndex convertes a 3d voxel-pos to a 1d array-index.
- Parameters
-
pos | -1 <= pos.xyz < voxelLengthWithNormalCorrection-1 |
toSet | |
- Returns
- returns true if anything changed.
template<class configType >
setVoxelLod sets a voxel to a lod array.
- Parameters
-
pos | |
toSet | |
lod | level of detail index |
- Returns
- returns true if anything changed.
- See also
- calculateCoordsLod()
template<class configType >
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/accessor.hpp