OpenMW
Public Member Functions | Private Attributes
Terrain::Chunk Class Reference

Renders a chunk of terrain, either using alpha splatting or a composite map. More...

#include <chunk.hpp>

List of all members.

Public Member Functions

 Chunk (QuadTreeNode *node, short lodLevel)
virtual ~Chunk ()
void setMaterial (const Ogre::MaterialPtr &material)
void setAdditionalLod (size_t lod)
size_t getAdditionalLod ()
void updateIndexBuffer ()
virtual const Ogre::String & getMovableType (void) const
virtual const
Ogre::AxisAlignedBox & 
getBoundingBox (void) const
virtual Ogre::Real getBoundingRadius (void) const
virtual void _updateRenderQueue (Ogre::RenderQueue *queue)
virtual void visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false)
virtual const Ogre::MaterialPtr & getMaterial (void) const
virtual void getRenderOperation (Ogre::RenderOperation &op)
virtual void getWorldTransforms (Ogre::Matrix4 *xform) const
virtual Ogre::Real getSquaredViewDepth (const Ogre::Camera *cam) const
virtual const Ogre::LightList & getLights (void) const

Private Attributes

QuadTreeNodemNode
Ogre::MaterialPtr mMaterial
size_t mVertexLod
size_t mAdditionalLod
Ogre::VertexData * mVertexData
Ogre::IndexData * mIndexData
Ogre::HardwareVertexBufferSharedPtr mVertexBuffer
Ogre::HardwareVertexBufferSharedPtr mNormalBuffer
Ogre::HardwareVertexBufferSharedPtr mColourBuffer
Ogre::HardwareIndexBufferSharedPtr mIndexBuffer

Detailed Description

Renders a chunk of terrain, either using alpha splatting or a composite map.


Constructor & Destructor Documentation

Terrain::Chunk::Chunk ( QuadTreeNode node,
short  lodLevel 
)
Parameters:
lodLevelLOD level for the vertex buffer.
Terrain::Chunk::~Chunk ( ) [virtual]

Member Function Documentation

void Terrain::Chunk::_updateRenderQueue ( Ogre::RenderQueue *  queue) [virtual]
size_t Terrain::Chunk::getAdditionalLod ( ) [inline]
const Ogre::AxisAlignedBox & Terrain::Chunk::getBoundingBox ( void  ) const [virtual]
Ogre::Real Terrain::Chunk::getBoundingRadius ( void  ) const [virtual]
const Ogre::LightList & Terrain::Chunk::getLights ( void  ) const [virtual]
const Ogre::MaterialPtr & Terrain::Chunk::getMaterial ( void  ) const [virtual]
virtual const Ogre::String& Terrain::Chunk::getMovableType ( void  ) const [inline, virtual]
void Terrain::Chunk::getRenderOperation ( Ogre::RenderOperation &  op) [virtual]
Ogre::Real Terrain::Chunk::getSquaredViewDepth ( const Ogre::Camera *  cam) const [virtual]
void Terrain::Chunk::getWorldTransforms ( Ogre::Matrix4 *  xform) const [virtual]
void Terrain::Chunk::setAdditionalLod ( size_t  lod) [inline]

Set additional LOD applied on top of vertex LOD.
This is achieved by changing the index buffer to omit vertices.

void Terrain::Chunk::setMaterial ( const Ogre::MaterialPtr &  material)
void Terrain::Chunk::visitRenderables ( Renderable::Visitor *  visitor,
bool  debugRenderables = false 
) [virtual]

Member Data Documentation

Ogre::HardwareVertexBufferSharedPtr Terrain::Chunk::mColourBuffer [private]
Ogre::HardwareIndexBufferSharedPtr Terrain::Chunk::mIndexBuffer [private]
Ogre::IndexData* Terrain::Chunk::mIndexData [private]
Ogre::MaterialPtr Terrain::Chunk::mMaterial [private]
Ogre::HardwareVertexBufferSharedPtr Terrain::Chunk::mNormalBuffer [private]
Ogre::HardwareVertexBufferSharedPtr Terrain::Chunk::mVertexBuffer [private]
Ogre::VertexData* Terrain::Chunk::mVertexData [private]
size_t Terrain::Chunk::mVertexLod [private]

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