The container class contains an array of voxel. The amount of voxel per tile is voxelLength^3. The class counts how many voxel are max and how many are min. if all voxel are min or max the class simple::container::base doesnt save them. Additionally it saves an axisAlignedBox which describes the bounds of the voxel that changed. More...
#include <container.hpp>
Public Types | |
| typedef configType | t_config |
|
typedef base< container < t_config > > | t_base |
| typedef t_config::t_data | t_data |
| typedef vector< t_data > | t_voxelArray |
Public Types inherited from blub::procedural::voxel::tile::base< container< configType > > | |
|
typedef sharedPointer < container< configType > > | pointer |
Public Types inherited from blub::enableSharedFromThis< container< configType > > | |
|
typedef std::enable_shared_from_this < container< configType > > | t_base |
|
typedef blub::sharedPointer < container< configType >const > | t_thisPtrConst |
|
typedef blub::sharedPointer < container< configType > > | t_thisPtr |
Public Member Functions | |
| virtual | ~container () |
| ~container destructor. | |
| void | startEdit () |
| startEdit resets the changed-voxel-bound-aab | |
| void | endEdit () |
| endEdit end edit | |
| const bool & | getEditing () const |
| getEditing returns if editing is active. More... | |
| const axisAlignedBoxInt32 & | getEditedVoxelBoundingBox () const |
| getEditedVoxelBoundingBox returns an axisAlignedBox which describes the bounds of the voxel that changed since the last call of startEdit(). More... | |
| void | setVoxel (const vector3int32 &pos, const t_data &toSet) |
| setVoxel sets an voxel to a local position. Extends changed axisAlignedBox-bounds and counts if voxel is minimum or maximum. More... | |
| void | setVoxelIfInterpolationHigher (const vector3int32 &pos, const t_data &toSet) |
| void | setVoxelIfInterpolationHigherEqualZero (const vector3int32 &pos, const t_data &toSet) |
| void | setVoxelIfInterpolationLower (const vector3int32 &pos, const t_data &toSet) |
| void | setFull () |
| setFull sets all voxel to max. More... | |
| void | setEmpty () |
| setFull sets all voxel to max. More... | |
| t_data | getVoxel (const vector3int32 &pos) const |
| getVoxel returns a copy of a local voxel. More... | |
| const t_data & | getVoxel (const int32 &index) const |
| getVoxel returns a copy of a local voxel. More... | |
| const t_voxelArray & | getVoxelArray (void) const |
| getVoxelArray returns reference voxel-array More... | |
| const int32 & | getCountVoxelLargerZero () const |
| getCountVoxelLargerZero returns number of voxel not minimum. More... | |
| const int32 & | getCountVoxelMaximum () const |
| getCountVoxelMaximum returns number of voxel that are maximum. More... | |
| const int32 & | getCountVoxelMinimum () const |
| getCountVoxelMinimum returns number of voxel that are minimum. More... | |
| bool | isEmpty () const |
| isEmpty returns true if all voxel are minimum. More... | |
| bool | isFull () const |
| isFull returns true if all voxel are maximum. More... | |
| void | operator= (const container &other) |
| operator = copy operator More... | |
Public Member Functions inherited from blub::enableSharedFromThis< container< configType > > | |
| t_thisPtrConst | getSharedThisPtr () const |
| t_thisPtr | getSharedThisPtr () |
Static Public Member Functions | |
| static t_base::pointer | create () |
| create creates an instance. More... | |
| static int32 | calculateIndex (const vector3int32 &pos) |
| calculateIndex convertes a 3d voxel-pos to a 1d array-index. 0 <= pos.xyz < voxelLength More... | |
Static Public Attributes | |
| static constexpr int32 | voxelLength = t_config::voxelsPerTile |
| static constexpr int32 | voxelCount = voxelLength*voxelLength*voxelLength |
Protected Member Functions | |
| container () | |
| container constructor | |
| bool | setVoxelIfInterpolationHigher (const int32 &index, const t_data &toSet) |
| bool | setVoxelIfInterpolationHigherEqualZero (const int32 &index, const t_data &toSet) |
| bool | setVoxelIfInterpolationLower (const int32 &index, const t_data &toSet) |
| bool | setVoxel (const int32 &index, const t_data &toSet) |
| setVoxel sets voxel to array and counts if voxel is maximum or minimum More... | |
Protected Member Functions inherited from blub::procedural::voxel::tile::base< container< configType > > | |
| base () | |
| base constrcutor. | |
The container class contains an array of voxel. The amount of voxel per tile is voxelLength^3. The class counts how many voxel are max and how many are min. if all voxel are min or max the class simple::container::base doesnt save them. Additionally it saves an axisAlignedBox which describes the bounds of the voxel that changed.
|
inlinestatic |
calculateIndex convertes a 3d voxel-pos to a 1d array-index. 0 <= pos.xyz < voxelLength
| pos | to convert. |
|
inlinestatic |
create creates an instance.
|
inline |
getCountVoxelLargerZero returns number of voxel not minimum.
|
inline |
getCountVoxelMaximum returns number of voxel that are maximum.
|
inline |
getCountVoxelMinimum returns number of voxel that are minimum.
|
inline |
getEditedVoxelBoundingBox returns an axisAlignedBox which describes the bounds of the voxel that changed since the last call of startEdit().
|
inline |
getEditing returns if editing is active.
|
inline |
getVoxel returns a copy of a local voxel.
| pos | local voxel-position. |
|
inline |
getVoxel returns a copy of a local voxel.
| index | local voxel-position. |
|
inline |
getVoxelArray returns reference voxel-array
|
inline |
|
inline |
|
inline |
operator = copy operator
| other |
|
inline |
setFull sets all voxel to max.
|
inline |
setFull sets all voxel to max.
|
inline |
setVoxel sets an voxel to a local position. Extends changed axisAlignedBox-bounds and counts if voxel is minimum or maximum.
| pos | |
| toSet |
|
inlineprotected |
setVoxel sets voxel to array and counts if voxel is maximum or minimum
| index | |
| toSet |
1.8.8