Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Private Member Functions | Private Attributes | Friends
render::MeshData Class Reference

Defines a mesh resource. More...

#include <MeshData.h>

Inheritance diagram for render::MeshData:
resource::Resource engine::Object

List of all members.

Public Member Functions

const core::aabox3dgetBoundingBox ()
 Gets the axis-aligned bounding box for this mesh.
f32 getBoundingSphereRadius ()
 Gets the radius of the bounding sphere surrounding this mesh.
resource::BufferUsagegetIndexBufferUsage ()
 Gets the index buffer usage for this Mesh.
IndexDatagetIndexData ()
 Gets the index data for this Mesh.
MaterialgetMaterial () const
 Sets the material which this mesh will use.
void getRenderOperation (RenderOperation &ro)
bool getUseIndexShadowBuffer ()
 Gets if index shadow buffer is used for this Mesh.
bool getUseVertexShadowBuffer ()
 Gets if vertex shadow buffer is used for this Mesh.
resource::BufferUsagegetVertexBufferUsage ()
 Gets the vertex buffer usage for this Mesh.
VertexDatagetVertexData ()
 Gets the vertex data for this Mesh.
 MeshData (const std::string &name, resource::Serializer *serializer)
void setBoundingBox (const core::aabox3d &box)
 Sets the axis-aligned bounding box for this mesh.
void setBoundingSphereRadius (f32 radius)
 Sets the radius of the bounding sphere surrounding this mesh.
void setIndexBufferPolicy (resource::BufferUsage usage, bool useShadowBuffer=false)
 Sets the policy for the index buffers to be used when loading this Mesh.
void setMaterial (const std::string &filename)
 Sets the name of the material which this mesh will use.
void setNewIndexData ()
 Sets new vertex data for this Mesh.
void setNewVertexData ()
 Sets new vertex data for this Mesh.
void setVertexBufferPolicy (resource::BufferUsage usage, bool useShadowBuffer=false)
 ~MeshData ()

Private Member Functions

void initProperties ()
void unloadImpl ()

Private Attributes

core::aabox3d mAABB
 Local bounding box volume.
f32 mBoundRadius
 Local bounding sphere radius (centered on object).
resource::BufferUsage mIndexBufferUsage
IndexDatamIndexData
 Face index data.
MaterialmMaterial
 The material this mesh uses.
OperationType mOperationType
 The render operation type used to render this mesh.
bool mUseIndexShadowBuffer
bool mUseVertexShadowBuffer
resource::BufferUsage mVertexBufferUsage
VertexDatamVertexData
 Dedicated vertex data.

Friends

class Model

Detailed Description

Defines a mesh resource.


Constructor & Destructor Documentation

render::MeshData::MeshData ( const std::string &  name,
resource::Serializer serializer 
)
render::MeshData::~MeshData ( )

Member Function Documentation

const core::aabox3d & render::MeshData::getBoundingBox ( )

Gets the axis-aligned bounding box for this mesh.

References mAABB.

Referenced by render::Model::updateImpl().

f32 render::MeshData::getBoundingSphereRadius ( )

Gets the radius of the bounding sphere surrounding this mesh.

References mBoundRadius.

Referenced by render::Model::updateImpl().

resource::BufferUsage & render::MeshData::getIndexBufferUsage ( )

Gets the index buffer usage for this Mesh.

References mIndexBufferUsage.

IndexData * render::MeshData::getIndexData ( )

Gets the index data for this Mesh.

References mIndexData.

Material * render::MeshData::getMaterial ( ) const

Sets the material which this mesh will use.

References mMaterial.

Referenced by render::Model::resourceLoaded().

void render::MeshData::getRenderOperation ( RenderOperation ro)
bool render::MeshData::getUseIndexShadowBuffer ( )

Gets if index shadow buffer is used for this Mesh.

References mUseIndexShadowBuffer.

bool render::MeshData::getUseVertexShadowBuffer ( )

Gets if vertex shadow buffer is used for this Mesh.

References mUseVertexShadowBuffer.

resource::BufferUsage & render::MeshData::getVertexBufferUsage ( )

Gets the vertex buffer usage for this Mesh.

References mVertexBufferUsage.

VertexData * render::MeshData::getVertexData ( )

Gets the vertex data for this Mesh.

References mVertexData.

void render::MeshData::initProperties ( ) [private]
void render::MeshData::setBoundingBox ( const core::aabox3d box)

Sets the axis-aligned bounding box for this mesh.

References mAABB.

void render::MeshData::setBoundingSphereRadius ( f32  radius)

Sets the radius of the bounding sphere surrounding this mesh.

References mBoundRadius.

void render::MeshData::setIndexBufferPolicy ( resource::BufferUsage  usage,
bool  useShadowBuffer = false 
)

Sets the policy for the index buffers to be used when loading this Mesh.

References mIndexBufferUsage, and mUseIndexShadowBuffer.

void render::MeshData::setMaterial ( const std::string &  filename)

Sets the name of the material which this mesh will use.

References resource::ResourceManager::getInstance(), mMaterial, and resource::RT_RESOURCE_RENDER_MATERIAL.

void render::MeshData::setNewIndexData ( )

Sets new vertex data for this Mesh.

References mIndexData.

void render::MeshData::setNewVertexData ( )

Sets new vertex data for this Mesh.

References mVertexData.

void render::MeshData::setVertexBufferPolicy ( resource::BufferUsage  usage,
bool  useShadowBuffer = false 
)

Sets the policy for the vertex buffers to be used when loading this Mesh. You can define the approach to a Mesh by changing the default parameters to MeshManager::load if you wish; this means the Mesh is loaded with those options the first time.

Parameters:
usage,:The usage flags, which by default are resource::BU_STATIC_WRITE_ONLY.
useShadowBuffer,:If set to true, the vertex buffers will be created with a system memory shadow buffer. You should set this if you want to be able to read from the buffer, because reading from a hardware buffer is a no-no.

References mUseVertexShadowBuffer, and mVertexBufferUsage.

void render::MeshData::unloadImpl ( ) [private, virtual]

Friends And Related Function Documentation

friend class Model [friend]

Member Data Documentation

Local bounding box volume.

Referenced by getBoundingBox(), initProperties(), setBoundingBox(), and unloadImpl().

Local bounding sphere radius (centered on object).

Referenced by getBoundingSphereRadius(), initProperties(), setBoundingSphereRadius(), and unloadImpl().

The material this mesh uses.

Referenced by getMaterial(), initProperties(), setMaterial(), and unloadImpl().

The render operation type used to render this mesh.

Referenced by getRenderOperation(), initProperties(), and unloadImpl().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by Doxygen (1.7.4)