voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
blub::procedural::voxel::tile::renderer< configType > Class Template Reference

The renderer class contains information if a tile::surface should get rendered and how it should get rendered. Class must get derived by your render-engine. In the derived class convert the vertices/indices to your hardware/software render engine. (Most likely to a hardwarebuffer) More...

#include <renderer.hpp>

Inheritance diagram for blub::procedural::voxel::tile::renderer< configType >:
blub::procedural::voxel::tile::base< renderer< configType > > blub::enableSharedFromThis< renderer< configType > > OgreTile< configType > customOgreTile< configType >

Public Types

typedef configType t_config
 
typedef base< renderer
< t_config > > 
t_base
 
typedef
t_config::t_renderer::t_tile * 
t_thiz
 
typedef t_config::t_surface::t_tile t_tileData
 
typedef blub::sharedPointer
< t_tileData > 
t_tileDataPtr
 
- Public Types inherited from blub::procedural::voxel::tile::base< renderer< configType > >
typedef sharedPointer
< renderer< configType > > 
pointer
 
- Public Types inherited from blub::enableSharedFromThis< renderer< configType > >
typedef
std::enable_shared_from_this
< renderer< configType > > 
t_base
 
typedef blub::sharedPointer
< renderer< configType >const > 
t_thisPtrConst
 
typedef blub::sharedPointer
< renderer< configType > > 
t_thisPtr
 

Public Member Functions

 ~renderer ()
 ~renderer destructor
 
void setTileData (t_tileDataPtr convertToRenderAble, const axisAlignedBox &aabb)
 Implement this method and cast the data to your graphic engine. More...
 
virtual void setVisible (const bool &vis)
 setVisible sets if a tile should get rendered. All lod-submeshes must not be rendered either. More...
 
virtual void setVisibleLod (const uint16 &indLod, const bool &vis)
 setVisibleLod sets if one of the 6 crack closing submeshes (for lod) should get rendered. More...
 
const bool & getVisible () const
 getVisible returns if a tile should get rendered. More...
 
const bool & getVisibleLod (const uint16 &indLod)
 getVisibleLod returns if a crack-closing lod-tile should get rendered. More...
 
- Public Member Functions inherited from blub::enableSharedFromThis< renderer< configType > >
t_thisPtrConst getSharedThisPtr () const
 
t_thisPtr getSharedThisPtr ()
 

Protected Member Functions

 renderer ()
 renderer constructor.
 
- Protected Member Functions inherited from blub::procedural::voxel::tile::base< renderer< configType > >
 base ()
 base constrcutor.
 

Protected Attributes

bool m_shouldBeVisible
 m_shouldBeVisible saves if tile should get rendered.
 
bool m_lodShouldBeVisible [6]
 saves if crack closing submesh should get rendered.
 

Detailed Description

template<class configType>
class blub::procedural::voxel::tile::renderer< configType >

The renderer class contains information if a tile::surface should get rendered and how it should get rendered. Class must get derived by your render-engine. In the derived class convert the vertices/indices to your hardware/software render engine. (Most likely to a hardwarebuffer)

Member Function Documentation

template<class configType >
const bool& blub::procedural::voxel::tile::renderer< configType >::getVisible ( ) const
inline

getVisible returns if a tile should get rendered.

Returns
template<class configType >
const bool& blub::procedural::voxel::tile::renderer< configType >::getVisibleLod ( const uint16 &  indLod)
inline

getVisibleLod returns if a crack-closing lod-tile should get rendered.

Parameters
indLod
Returns
template<class configType >
void blub::procedural::voxel::tile::renderer< configType >::setTileData ( t_tileDataPtr  convertToRenderAble,
const axisAlignedBox aabb 
)
inline

Implement this method and cast the data to your graphic engine.

Parameters
convertToRenderAbleContains vertices and indices.
aabbThe axisAlignedBox that describes the bound of the vertices.
template<class configType >
virtual void blub::procedural::voxel::tile::renderer< configType >::setVisible ( const bool &  vis)
inlinevirtual

setVisible sets if a tile should get rendered. All lod-submeshes must not be rendered either.

Parameters
vistrue for visible.

Reimplemented in OgreTile< configType >.

template<class configType >
virtual void blub::procedural::voxel::tile::renderer< configType >::setVisibleLod ( const uint16 &  indLod,
const bool &  vis 
)
inlinevirtual

setVisibleLod sets if one of the 6 crack closing submeshes (for lod) should get rendered.

Parameters
indLod0 to 6
vis

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