28 #ifndef __Ogre_Volume_Chunk_H__
29 #define __Ogre_Volume_Chunk_H__
98 sceneManager(0), src(0), baseError((
Real)0.0), errorMultiplicator((
Real)1.0), createOctreeVisualization(false),
99 createDualGridVisualization(false), skirtFactor(0), lodCallback(0), scale((
Real)1.0), maxScreenSpaceError(0), createGeometryFromLevel(0),
204 virtual bool contributesToVolumeMesh(
const Vector3 &from,
const Vector3 &to)
const;
296 if (applyToChildren && mChildren)
323 virtual ~
Chunk(
void);
327 virtual const String& getMovableType(
void)
const;
331 virtual Real getSquaredViewDepth(
const Camera* camera)
const;
335 virtual Real getBoundingRadius()
const;
373 virtual void setDualGridVisible(
const bool visible);
380 virtual bool getDualGridVisible(
void)
const;
386 virtual void setOctreeVisible(
const bool visible);
393 virtual bool getOctreeVisible(
void)
const;
399 virtual void setVolumeVisible(
const bool visible);
405 virtual bool getVolumeVisible(
void)
const;
409 virtual bool frameStarted(
const FrameEvent& evt);
415 virtual Chunk* createInstance(
void);
420 virtual void setMaterial(
const String& matName);
430 virtual void setMaterialOfLevel(
size_t level,
const String& matName);
443 virtual void getChunksOfLevel(
const size_t level, VecChunk &result)
const;
static ChunkHandler mChunkHandler
To handle the WorkQueue.
~ChunkTreeSharedData(void)
Destructor.
Callback class when the user needs information about the triangles of chunks of a LOD level...
bool dualGridVisible
Flag whether the dualgrid is visible or not.
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.
Real errorMultiplicator
The error multiplicator per LOD level with 1.0 as default.
bool createOctreeVisualization
Whether to create the octree debug visualization entity with false as default.
float Real
Software floating point type.
ChunkTreeSharedData * mShared
Holds some shared data among all chunks of the tree.
Parameters for loading the volume.
Class representing a node in the scene graph.
static String DEFAULT_RESOURCE_GROUP_NAME
Default resource group name.
SceneManager * sceneManager
The scenemanager to construct the entity with.
Internal shared values of the chunks which are equal in the whole tree.
Entity * mOctree
The debug visualization of the octree.
Vector3 updateFrom
If an existing chunktree is to be partially updated, set this to the back lower left point of the (su...
Handles the WorkQueue management of the chunks.
Standard 3-dimensional vector.
Real mError
Holds the error associated with this chunk.
A single volume chunk mesh.
static const String MOVABLE_TYPE_NAME
The type name.
Vector3 updateTo
If an existing chunktree is to be partially updated, set this to the front upper right point of the (...
ChunkTreeSharedData(const ChunkParameters *params)
Constructor.
Real skirtFactor
Factor for the skirt length generation.
virtual void setVisible(bool visible)
Tells this object whether to be visible or not, if it has a renderable component. ...
Real maxScreenSpaceError
The maximum accepted screen space error when choosing the LOD levels to render.
ChunkParameters(void)
Constructor.
Struct containing information about a frame event.
MeshBuilderCallback * lodCallback
Callback for a specific LOD level.
bool createDualGridVisualization
Whether to create the dualgrid debug visualization entity with false as default.
Source * src
The volume source.
ChunkParameters * parameters
The parameters with which the chunktree got loaded.
Entity * mDualGrid
Holds the dualgrid debug visualization.
A viewpoint from which the scene will be rendered.
Real baseError
The smallest allowed geometric error of the highest LOD.
bool async
Whether to load the chunks async. if set to false, the call to load waits for the whole chunk...
A node in the volume octree.
struct Ogre::Volume::ChunkParameters ChunkParameters
Parameters for loading the volume.
Class for the generation of the DualGrid.
bool isRoot
Whether this chunk is the root of the tree.
bool mInvisible
Flag whether this node will never be shown.
size_t createGeometryFromLevel
The first LOD level to create geometry for. For scenarios where the lower levels won't be visible any...
Defines an instance of a discrete, movable object based on a Mesh.
struct Ogre::Volume::ChunkTreeSharedData ChunkTreeSharedData
Internal shared values of the chunks which are equal in the whole tree.
Abstract class defining the density function.
Manages the organisation and rendering of a 'scene' i.e.
Real scale
The scale of the volume with 1.0 as default.
vector< const Chunk * >::type VecChunk
A list of Chunks.
bool octreeVisible
Flag whether the octree is visible or not.
bool volumeVisible
Another visibility flag to be user setable.
#define _OgreVolumeExport
Simple implementation of MovableObject and Renderable for single-part custom objects.
A interface class defining a listener which can be used to receive notifications of frame events...
int chunksBeingProcessed
The amount of chunks being processed (== loading).
Class to build up a mesh with vertices and indices.