insertes/removes voxels that are included in an blub::axisAlignedBox. Always axis-aligned - use box if you want to rotate. More...
#include <axisAlignedBox.hpp>
Public Types | |
typedef configType | t_config |
typedef base< configType > | t_base |
typedef sharedPointer < axisAlignedBox > | pointer |
typedef t_config::t_data | t_voxel |
![]() | |
typedef configType | t_config |
typedef enableSharedFromThis < base< t_config > > | t_base |
typedef sharedPointer< base < t_config > > | pointer |
typedef t_config::t_container::t_simple | t_voxelContainerSimple |
typedef t_config::t_container::t_tile | t_voxelContainerTile |
typedef t_config::t_data | t_voxel |
![]() | |
typedef std::enable_shared_from_this < base< configType > > | t_base |
typedef blub::sharedPointer < base< configType >const > | t_thisPtrConst |
typedef blub::sharedPointer < base< configType > > | t_thisPtr |
Public Member Functions | |
virtual | ~axisAlignedBox () |
Destructor. | |
void | setAxisAlignedBox (const ::blub::axisAlignedBox &desc) |
Changes the voxel-describing bounding-box. DON'T change it while class is generating voxel. Else incorrect and incosinstent voxel will get created. More... | |
const ::blub::axisAlignedBox & | getAxisAlignedBox () const |
Returns the describing blub::axisAlignedBox set by constructor or by setAxisAlignedBox(). More... | |
![]() | |
virtual | ~base () |
destructor | |
void | calculateVoxel (const transform &trans) const |
calculates voxel in the container u have to set by setVoxelContainer() before. If setVoxelContainer() didn't get called before, method will assert. More... | |
virtual void | calculateVoxel (t_voxelContainerTile *voxelContainer, const vector3int32 &voxelContainerOffset, const transform &trans) const |
calculates all voxel in getAxisAlignedBoundingBox() and inserts them into voxelContainer. Method gets called once per tile from various threads. Voxel only will get set if the interpolation is higher than the inerpoaltion before calculation. More... | |
void | setCut (const bool &cut) |
Enable or disable cut. Don't change the value while active calculation. More... | |
const bool & | getCut () const |
Returns if cutting is enabled. More... | |
void | setVoxelContainer (t_voxelContainerSimple *toSet) |
Sets the voxelcontainer used by calculateVoxel(). More... | |
t_voxelContainerSimple * | getVoxelContainer () const |
![]() | |
t_thisPtrConst | getSharedThisPtr () const |
t_thisPtr | getSharedThisPtr () |
Static Public Member Functions | |
static pointer | create (const ::blub::axisAlignedBox &desc) |
Allocates an instance and initialises the class. More... | |
Protected Member Functions | |
blub::axisAlignedBox | getAxisAlignedBoundingBox (const transform &trans) const override |
returns the bounding box describing the voxel to be recalculated More... | |
bool | calculateOneVoxel (const vector3 &pos, t_voxel *resultVoxel) const override |
checks if voxel is inside aab More... | |
![]() | |
virtual void | createLine (t_voxelContainerTile *voxelContainer, const vector3int32 &posVoxel, const real &from, const real &len, const axis &ax, const blub::plane &planeA, const blub::plane &planeB) const |
createLine creates a voxel-line on one axis with a specific length More... | |
Additional Inherited Members | |
![]() | |
enum | axis { x, y, z } |
The axis enum is used by createLine() for describing the direction. | |
![]() | |
t_voxelContainerSimple * | m_voxelContainer |
bool | m_cut |
insertes/removes voxels that are included in an blub::axisAlignedBox. Always axis-aligned - use box if you want to rotate.
|
inlineoverrideprotectedvirtual |
checks if voxel is inside aab
pos | describes the voxel-position |
resultVoxel | if pos is inside, resultVoxel interpolation gets set to maximum. Must not be nullptr |
Reimplemented from blub::procedural::voxel::edit::base< configType >.
|
inlinestatic |
Allocates an instance and initialises the class.
desc | The axis-aligend-box that describes the to create voxel. desc must be a valid blub::axisAlignedBox. |
|
inlineoverrideprotectedvirtual |
returns the bounding box describing the voxel to be recalculated
trans | describes the tranformation the edit uses |
Implements blub::procedural::voxel::edit::base< configType >.
|
inline |
Returns the describing blub::axisAlignedBox set by constructor or by setAxisAlignedBox().
|
inline |
Changes the voxel-describing bounding-box. DON'T change it while class is generating voxel. Else incorrect and incosinstent voxel will get created.
desc | The Voxel descriptor. |