a voxel-generator defined by a transform-able-box. More...
#include <box.hpp>
Public Types | |
typedef base< voxelType > | t_base |
typedef sharedPointer< box < voxelType > > | pointer |
![]() | |
typedef voxelType | 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< voxelType > > | t_base |
typedef blub::sharedPointer < base< voxelType >const > | t_thisPtrConst |
typedef blub::sharedPointer < base< voxelType > > | t_thisPtr |
Public Member Functions | |
blub::axisAlignedBox | getAxisAlignedBoundingBox (const transform &trans) const override |
getAxisAlignedBoundingBox returns the scaled, transformed bounding box of the to calculate voxels 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... | |
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 vector3 &size, const quaternion &rotation) |
create creates an instance of box. More... | |
Protected Member Functions | |
box (const vector3 &size, const quaternion &rotation) | |
constructor. Sets up the cutPlanes of the box More... | |
void | calculateVoxel (typename t_base::t_voxelContainerTile *voxelContainer, const vector3int32 &voxelContainerOffset, const transform &trans) const override |
calculateVoxel cuts the box in voxelLines. Only sets values if voxel is inside box. More... | |
![]() | |
virtual bool | calculateOneVoxel (const vector3 &pos, t_voxel *resultVoxel) const |
Implement this method for your own edit. 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 |
The axis enum is used by createLine() for describing the direction. | |
![]() | |
t_voxelContainerSimple * | m_voxelContainer |
bool | m_cut |
a voxel-generator defined by a transform-able-box.
|
inlineprotected |
constructor. Sets up the cutPlanes of the box
size | The Scale of the box. |
rotation | The rotatation of the box. |
|
inlineoverrideprotectedvirtual |
calculateVoxel cuts the box in voxelLines. Only sets values if voxel is inside box.
voxelContainer | Must not be nullptr |
voxelContainerOffset | the absolute position of the container |
trans | The transform |
Reimplemented from blub::procedural::voxel::edit::base< voxelType >.
|
inlinestatic |
create creates an instance of box.
size | The scale of the box. |
rotation | The orientation of the box. |
|
inlineoverridevirtual |
getAxisAlignedBoundingBox returns the scaled, transformed bounding box of the to calculate voxels
trans | The transfrom |
Implements blub::procedural::voxel::edit::base< voxelType >.