OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::Volume::Chunk Class Reference

A single volume chunk mesh. More...

#include <OgreVolumeChunk.h>

+ Inheritance diagram for Ogre::Volume::Chunk:

Public Types

typedef vector< const Chunk * >::type VecChunk
 A list of Chunks. More...
 

Public Member Functions

 Chunk ()
 Constructor. More...
 
virtual ~Chunk ()
 Destructor. More...
 
virtual ChunkcreateInstance ()
 Overridable factory method. More...
 
virtual bool frameStarted (const FrameEvent &evt)
 Overridden from FrameListener. More...
 
virtual Real getBoundingRadius () const
 Overridden from MovableObject. More...
 
ChunkParametersgetChunkParameters ()
 Gets the parameters with which the chunktree got loaded. More...
 
virtual void getChunksOfLevel (const size_t level, VecChunk &result) const
 Gathers all visible chunks (containing triangles) of a specific LOD level. More...
 
virtual bool getDualGridVisible () const
 Gets whether the debug visualization entity of the dualgrid is visible. More...
 
virtual const StringgetMovableType () const
 Overridden from MovableObject. More...
 
virtual bool getOctreeVisible () const
 Gets whether the debug visualization entity of the octree is visible. More...
 
virtual Real getSquaredViewDepth (const Camera *camera) const
 Overridden from Renderable. More...
 
virtual bool getVolumeVisible () const
 Gets whether the volume mesh is visible. More...
 
virtual void load (SceneNode *parent, const Vector3 &from, const Vector3 &to, size_t level, const ChunkParameters *parameters)
 Loads the volume mesh with all LODs. More...
 
virtual void load (SceneNode *parent, SceneManager *sceneManager, const String &filename, bool validSourceResult=false, MeshBuilderCallback *lodCallback=0, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Loads a TextureSource volume scene from a config file. More...
 
virtual void setDualGridVisible (const bool visible)
 Shows the debug visualization entity of the dualgrid. More...
 
virtual void setMaterial (const String &matName)
 Overridden from SimpleRenderable. More...
 
virtual void setMaterialOfLevel (size_t level, const String &matName)
 Sets the material of all chunks of a specific level in the tree. More...
 
virtual void setOctreeVisible (const bool visible)
 Shows the debug visualization entity of the octree. More...
 
virtual void setVolumeVisible (const bool visible)
 Sets whether the volume mesh is visible. More...
 
- Public Member Functions inherited from Ogre::FrameListener
virtual ~FrameListener ()
 
virtual bool frameEnded (const FrameEvent &evt)
 Called just after a frame has been rendered. More...
 
virtual bool frameRenderingQueued (const FrameEvent &evt)
 Called after all render targets have had their rendering commands issued, but before render windows have been asked to flip their buffers over. More...
 

Static Public Attributes

static const String MOVABLE_TYPE_NAME
 The type name. More...
 

Detailed Description

A single volume chunk mesh.

Member Typedef Documentation

◆ VecChunk

typedef vector<const Chunk*>::type Ogre::Volume::Chunk::VecChunk

A list of Chunks.

Constructor & Destructor Documentation

◆ Chunk()

Ogre::Volume::Chunk::Chunk ( )

Constructor.

◆ ~Chunk()

virtual Ogre::Volume::Chunk::~Chunk ( )
virtual

Destructor.

Member Function Documentation

◆ createInstance()

virtual Chunk* Ogre::Volume::Chunk::createInstance ( )
virtual

Overridable factory method.

Returns
The created chunk.

◆ frameStarted()

virtual bool Ogre::Volume::Chunk::frameStarted ( const FrameEvent evt)
virtual

Overridden from FrameListener.

Reimplemented from Ogre::FrameListener.

◆ getBoundingRadius()

virtual Real Ogre::Volume::Chunk::getBoundingRadius ( ) const
virtual

Overridden from MovableObject.

◆ getChunkParameters()

ChunkParameters* Ogre::Volume::Chunk::getChunkParameters ( )

Gets the parameters with which the chunktree got loaded.

Returns
The parameters.

◆ getChunksOfLevel()

virtual void Ogre::Volume::Chunk::getChunksOfLevel ( const size_t  level,
VecChunk result 
) const
virtual

Gathers all visible chunks (containing triangles) of a specific LOD level.

Parameters
levelThe desired chunk level, 0 based. 0 means the chunk with the lowest level of detail. If the chunks are loaded with a level amount of 5, valid values here are 0-4.
resultVector where the chunks will be added to.

◆ getDualGridVisible()

virtual bool Ogre::Volume::Chunk::getDualGridVisible ( ) const
virtual

Gets whether the debug visualization entity of the dualgrid is visible.

Returns
true if visible.

◆ getMovableType()

virtual const String& Ogre::Volume::Chunk::getMovableType ( ) const
virtual

Overridden from MovableObject.

◆ getOctreeVisible()

virtual bool Ogre::Volume::Chunk::getOctreeVisible ( ) const
virtual

Gets whether the debug visualization entity of the octree is visible.

Returns
true if visible.

◆ getSquaredViewDepth()

virtual Real Ogre::Volume::Chunk::getSquaredViewDepth ( const Camera camera) const
virtual

Overridden from Renderable.

◆ getVolumeVisible()

virtual bool Ogre::Volume::Chunk::getVolumeVisible ( ) const
virtual

Gets whether the volume mesh is visible.

Returns
true if visible

◆ load() [1/2]

virtual void Ogre::Volume::Chunk::load ( SceneNode parent,
const Vector3 from,
const Vector3 to,
size_t  level,
const ChunkParameters parameters 
)
virtual

Loads the volume mesh with all LODs.

Parameters
parentThe parent scene node for the volume
fromThe back lower left corner of the cell.
toThe front upper right corner of the cell.
levelThe amount of LOD level.
parametersThe parameters to use while loading.

◆ load() [2/2]

virtual void Ogre::Volume::Chunk::load ( SceneNode parent,
SceneManager sceneManager,
const String filename,
bool  validSourceResult = false,
MeshBuilderCallback lodCallback = 0,
const String resourceGroup = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)
virtual

Loads a TextureSource volume scene from a config file.

Parameters
parentThe parent scene node for the volume.
sceneManagerThe scenemanager to construct the entity with.
filenameThe filename of the configuration file.
validSourceResultIf you want to use the loaded source afterwards of the parameters, set this to true. Beware, that you will have to delete the pointer on your own then! On false here, it internally frees the memory for you
lodCallbackCallback for a specific LOD level.
resourceGroupThe resource group where to search for the configuration file.

◆ setDualGridVisible()

virtual void Ogre::Volume::Chunk::setDualGridVisible ( const bool  visible)
virtual

Shows the debug visualization entity of the dualgrid.

Parameters
visibleWhether the grid should be visible.

◆ setMaterial()

virtual void Ogre::Volume::Chunk::setMaterial ( const String matName)
virtual

Overridden from SimpleRenderable.

Sets the material of this chunk and all of his children.

◆ setMaterialOfLevel()

virtual void Ogre::Volume::Chunk::setMaterialOfLevel ( size_t  level,
const String matName 
)
virtual

Sets the material of all chunks of a specific level in the tree.

This allows LODs where the lower levels (== less detail and more far away) have simpler materials.

Parameters
levelThe tree level getting the material, 0 based. 0 means the chunk with the lowest level of detail.
matNameThe material name to set.

◆ setOctreeVisible()

virtual void Ogre::Volume::Chunk::setOctreeVisible ( const bool  visible)
virtual

Shows the debug visualization entity of the octree.

Parameters
visibleWhether the octree should be visible.

◆ setVolumeVisible()

virtual void Ogre::Volume::Chunk::setVolumeVisible ( const bool  visible)
virtual

Sets whether the volume mesh is visible.

Parameters
visibletrue if visible

Member Data Documentation

◆ MOVABLE_TYPE_NAME

const String Ogre::Volume::Chunk::MOVABLE_TYPE_NAME
static

The type name.


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