Go to the documentation of this file.
28 #ifndef __Ogre_Volume_Chunk_H__
29 #define __Ogre_Volume_Chunk_H__
296 if (applyToChildren && mChildren)
A interface class defining a listener which can be used to receive notifications of frame events.
Vector3 updateFrom
If an existing chunktree is to be partially updated, set this to the back lower left point of the (su...
virtual bool contributesToVolumeMesh(const Vector3 &from, const Vector3 &to) const
Whether the center of the given cube (from -> to) will contribute something to the total volume mesh.
Class to build up a mesh with vertices and indices.
MeshBuilderCallback * lodCallback
Callback for a specific LOD level.
bool createDualGridVisualization
Whether to create the dualgrid debug visualization entity with false as default.
ChunkParameters * getChunkParameters(void)
Gets the parameters with which the chunktree got loaded.
A viewpoint from which the scene will be rendered.
Real maxScreenSpaceError
The maximum accepted screen space error when choosing the LOD levels to render.
bool dualGridVisible
Flag whether the dualgrid is visible or not.
Vector3 updateTo
If an existing chunktree is to be partially updated, set this to the front upper right point of the (...
Real mError
Holds the error associated with this chunk.
static const String MOVABLE_TYPE_NAME
The type name.
ChunkParameters(void)
Constructor.
vector< const Chunk * >::type VecChunk
A list of Chunks.
struct Ogre::Volume::ChunkTreeSharedData ChunkTreeSharedData
Internal shared values of the chunks which are equal in the whole tree.
virtual Real getSquaredViewDepth(const Camera *camera) const
Overridden from Renderable.
Internal shared values of the chunks which are equal in the whole tree.
virtual Real getBoundingRadius() const
Overridden from MovableObject.
virtual void loadGeometry(MeshBuilder *meshBuilder, DualGridGenerator *dualGridGenerator, OctreeNode *root, size_t level, bool isUpdate)
Loads the actual geometry when the processing is done.
virtual void loadChunk(SceneNode *parent, const Vector3 &from, const Vector3 &to, const Vector3 &totalFrom, const Vector3 &totalTo, const size_t level, const size_t maxLevels)
Loads a single chunk of the tree.
A single volume chunk mesh.
Handles the WorkQueue management of the chunks.
virtual bool getOctreeVisible(void) const
Gets whether the debug visualization entity of the octree is visible.
Callback class when the user needs information about the triangles of chunks of a LOD level.
size_t createGeometryFromLevel
The first LOD level to create geometry for. For scenarios where the lower levels won't be visible any...
virtual bool getDualGridVisible(void) const
Gets whether the debug visualization entity of the dualgrid is visible.
Defines an instance of a discrete, movable object based on a Mesh.
Class representing a node in the scene graph.
virtual void loadChildren(SceneNode *parent, const Vector3 &from, const Vector3 &to, const Vector3 &totalFrom, const Vector3 &totalTo, const size_t level, const size_t maxLevels)
Loads the tree children of the current node.
virtual void prepareGeometry(size_t level, OctreeNode *root, DualGridGenerator *dualGridGenerator, MeshBuilder *meshBuilder, const Vector3 &totalFrom, const Vector3 &totalTo)
Prepares the geometry of the chunk request.
virtual void setMaterial(const String &matName)
Overridden from SimpleRenderable.
virtual const String & getMovableType(void) const
Overridden from MovableObject.
void setChunkVisible(const bool visible, const bool applyToChildren)
Sets the visibility of this chunk.
Chunk ** mChildren
The more detailed children chunks.
SceneNode * mNode
To attach this node to.
virtual bool getVolumeVisible(void) const
Gets whether the volume mesh is visible.
virtual void load(SceneNode *parent, const Vector3 &from, const Vector3 &to, size_t level, const ChunkParameters *parameters)
Loads the volume mesh with all LODs.
Manages the organisation and rendering of a 'scene' i.e.
virtual void setMaterialOfLevel(size_t level, const String &matName)
Sets the material of all chunks of a specific level in the tree.
Entity * mDualGrid
Holds the dualgrid debug visualization.
bool mInvisible
Flag whether this node will never be shown.
virtual void setOctreeVisible(const bool visible)
Shows the debug visualization entity of the octree.
ChunkTreeSharedData * mShared
Holds some shared data among all chunks of the tree.
Parameters for loading the volume.
Entity * mOctree
The debug visualization of the octree.
static String DEFAULT_RESOURCE_GROUP_NAME
Default resource group name.
bool createOctreeVisualization
Whether to create the octree debug visualization entity with false as default.
Real errorMultiplicator
The error multiplicator per LOD level with 1.0 as default.
virtual void doLoad(SceneNode *parent, const Vector3 &from, const Vector3 &to, const Vector3 &totalFrom, const Vector3 &totalTo, const size_t level, const size_t maxLevels)
Actually loads the volume tree with all LODs.
Real skirtFactor
Factor for the skirt length generation.
bool octreeVisible
Flag whether the octree is visible or not.
Struct containing information about a frame event.
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.
Real scale
The scale of the volume with 1.0 as default.
bool volumeVisible
Another visibility flag to be user setable.
virtual void setDualGridVisible(const bool visible)
Shows the debug visualization entity of the dualgrid.
#define _OgreVolumeExport
ChunkParameters * parameters
The parameters with which the chunktree got loaded.
virtual void getChunksOfLevel(const size_t level, VecChunk &result) const
Gathers all visible chunks (containing triangles) of a specific LOD level.
ChunkTreeSharedData(const ChunkParameters *params)
Constructor.
static ChunkHandler mChunkHandler
To handle the WorkQueue.
struct Ogre::Volume::ChunkParameters ChunkParameters
Parameters for loading the volume.
virtual ~Chunk(void)
Destructor.
SceneManager * sceneManager
The scenemanager to construct the entity with.
virtual Chunk * createInstance(void)
Overridable factory method.
Class for the generation of the DualGrid.
Simple implementation of MovableObject and Renderable for single-part custom objects.
float Real
Software floating point type.
bool async
Whether to load the chunks async. if set to false, the call to load waits for the whole chunk....
virtual void setVolumeVisible(const bool visible)
Sets whether the volume mesh is visible.
bool isRoot
Whether this chunk is the root of the tree.
int chunksBeingProcessed
The amount of chunks being processed (== loading).
~ChunkTreeSharedData(void)
Destructor.
Real baseError
The smallest allowed geometric error of the highest LOD.
Standard 3-dimensional vector.
Abstract class defining the density function.
virtual bool frameStarted(const FrameEvent &evt)
Overridden from FrameListener.
virtual void setVisible(bool visible)
Tells this object whether to be visible or not, if it has a renderable component.
Source * src
The volume source.
A node in the volume octree.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.