voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
blub::procedural::voxel::edit::box< voxelType > Class Template Reference

a voxel-generator defined by a transform-able-box. More...

#include <box.hpp>

Inheritance diagram for blub::procedural::voxel::edit::box< voxelType >:
blub::procedural::voxel::edit::base< voxelType > blub::enableSharedFromThis< base< voxelType > > blub::noncopyable

Public Types

typedef base< voxelType > t_base
 
typedef sharedPointer< box
< voxelType > > 
pointer
 
- Public Types inherited from blub::procedural::voxel::edit::base< voxelType >
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
 
- Public Types inherited from blub::enableSharedFromThis< base< voxelType > >
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...
 
- Public Member Functions inherited from blub::procedural::voxel::edit::base< voxelType >
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
 
- Public Member Functions inherited from blub::enableSharedFromThis< base< voxelType > >
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...
 
- Protected Member Functions inherited from blub::procedural::voxel::edit::base< voxelType >
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

- Protected Types inherited from blub::procedural::voxel::edit::base< voxelType >
enum  axis
 The axis enum is used by createLine() for describing the direction.
 
- Protected Attributes inherited from blub::procedural::voxel::edit::base< voxelType >
t_voxelContainerSimple * m_voxelContainer
 
bool m_cut
 

Detailed Description

template<class voxelType>
class blub::procedural::voxel::edit::box< voxelType >

a voxel-generator defined by a transform-able-box.

Constructor & Destructor Documentation

template<class voxelType >
blub::procedural::voxel::edit::box< voxelType >::box ( const vector3 size,
const quaternion rotation 
)
inlineprotected

constructor. Sets up the cutPlanes of the box

Parameters
sizeThe Scale of the box.
rotationThe rotatation of the box.

Member Function Documentation

template<class voxelType >
void blub::procedural::voxel::edit::box< voxelType >::calculateVoxel ( typename t_base::t_voxelContainerTile *  voxelContainer,
const vector3int32 voxelContainerOffset,
const transform trans 
) const
inlineoverrideprotectedvirtual

calculateVoxel cuts the box in voxelLines. Only sets values if voxel is inside box.

Parameters
voxelContainerMust not be nullptr
voxelContainerOffsetthe absolute position of the container
transThe transform

Reimplemented from blub::procedural::voxel::edit::base< voxelType >.

template<class voxelType >
static pointer blub::procedural::voxel::edit::box< voxelType >::create ( const vector3 size,
const quaternion rotation 
)
inlinestatic

create creates an instance of box.

Parameters
sizeThe scale of the box.
rotationThe orientation of the box.
Returns
Returns an initialized shared_ptr of box
template<class voxelType >
blub::axisAlignedBox blub::procedural::voxel::edit::box< voxelType >::getAxisAlignedBoundingBox ( const transform trans) const
inlineoverridevirtual

getAxisAlignedBoundingBox returns the scaled, transformed bounding box of the to calculate voxels

Parameters
transThe transfrom

Implements blub::procedural::voxel::edit::base< voxelType >.


The documentation for this class was generated from the following files: