convertes a mesh to voxel. Fills a boost::geometry::index::rtree with the polygons. Initialization O(numTriangles). Voxel-generation O(numVoxel) More...
#include <mesh.hpp>
Public Types | |
typedef sharedPointer< mesh < voxelType > > | pointer |
typedef base< voxelType > | t_base |
typedef tile::container < voxelType > | t_tileContainer |
typedef boost::geometry::model::point < real, 3, boost::geometry::cs::cartesian > | t_point |
typedef boost::geometry::model::box < t_point > | t_box |
typedef boost::geometry::model::segment < t_point > | t_segment |
typedef std::pair< t_box, triangleVector3 > | t_value |
typedef boost::geometry::index::rtree < t_value, boost::geometry::index::quadratic< 16 > > | t_tree |
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 | |
virtual | ~mesh () |
~mesh destructor | |
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... | |
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 |
Public Member Functions inherited from blub::enableSharedFromThis< base< voxelType > > | |
t_thisPtrConst | getSharedThisPtr () const |
t_thisPtr | getSharedThisPtr () |
Static Public Member Functions | |
static pointer | create () |
creates an instance of the class. More... | |
Protected Types | |
typedef vector< t_tree * > | t_trees |
Protected Types inherited from blub::procedural::voxel::edit::base< voxelType > | |
enum | axis |
The axis enum is used by createLine() for describing the direction. | |
Protected Member Functions | |
mesh () | |
mesh contructor | |
blub::axisAlignedBox | getAxisAlignedBoundingBox (const transform &trans) const override |
getAxisAlignedBoundingBox returns the transformed bounding box that includes the mesh. More... | |
void | calculateVoxel (t_tileContainer *voxelContainer, const vector3int32 &voxelContainerOffset, const transform &) const |
calculateVoxel The tree, which got generated in load() gets intersected for every voxel line. 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... | |
Protected Attributes | |
t_trees | m_trees |
blub::axisAlignedBox | m_aabb |
Protected Attributes inherited from blub::procedural::voxel::edit::base< voxelType > | |
t_voxelContainerSimple * | m_voxelContainer |
bool | m_cut |
convertes a mesh to voxel. Fills a boost::geometry::index::rtree with the polygons. Initialization O(numTriangles). Voxel-generation O(numVoxel)
|
inlineprotected |
calculateVoxel The tree, which got generated in load() gets intersected for every voxel line.
voxelContainer | Container where to set the voxel in. |
voxelContainerOffset | Absolut position of the voxelContainer. |
trans | Transform |
|
inlinestatic |
creates an instance of the class.
|
inlineoverrideprotectedvirtual |
getAxisAlignedBoundingBox returns the transformed bounding box that includes the mesh.
trans | Transform of edit |
Implements blub::procedural::voxel::edit::base< voxelType >.