Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
Defines a mesh resource. More...
#include <MeshData.h>
Public Member Functions | |
const core::aabox3d & | getBoundingBox () |
Gets the axis-aligned bounding box for this mesh. | |
f32 | getBoundingSphereRadius () |
Gets the radius of the bounding sphere surrounding this mesh. | |
resource::BufferUsage & | getIndexBufferUsage () |
Gets the index buffer usage for this Mesh. | |
IndexData * | getIndexData () |
Gets the index data for this Mesh. | |
Material * | getMaterial () 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::BufferUsage & | getVertexBufferUsage () |
Gets the vertex buffer usage for this Mesh. | |
VertexData * | getVertexData () |
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 |
IndexData * | mIndexData |
Face index data. | |
Material * | mMaterial |
The material this mesh uses. | |
OperationType | mOperationType |
The render operation type used to render this mesh. | |
bool | mUseIndexShadowBuffer |
bool | mUseVertexShadowBuffer |
resource::BufferUsage | mVertexBufferUsage |
VertexData * | mVertexData |
Dedicated vertex data. | |
Friends | |
class | Model |
Defines a mesh resource.
render::MeshData::MeshData | ( | const std::string & | name, |
resource::Serializer * | serializer | ||
) |
References initProperties(), resource::Resource::mResourceType, and resource::RT_RESOURCE_MESH_DATA.
render::MeshData::~MeshData | ( | ) |
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] |
Reimplemented from resource::Resource.
References resource::BU_STATIC_WRITE_ONLY, mAABB, mBoundRadius, mIndexBufferUsage, mIndexData, mMaterial, mOperationType, mUseIndexShadowBuffer, mUseVertexShadowBuffer, mVertexBufferUsage, mVertexData, and render::OT_TRIANGLE_LIST.
Referenced by MeshData().
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.
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] |
Reimplemented from resource::Resource.
References resource::BU_STATIC_WRITE_ONLY, mAABB, mBoundRadius, mIndexBufferUsage, mIndexData, mMaterial, mOperationType, mUseIndexShadowBuffer, mUseVertexShadowBuffer, mVertexBufferUsage, mVertexData, and render::OT_TRIANGLE_LIST.
friend class Model [friend] |
core::aabox3d render::MeshData::mAABB [private] |
Local bounding box volume.
Referenced by getBoundingBox(), initProperties(), setBoundingBox(), and unloadImpl().
f32 render::MeshData::mBoundRadius [private] |
Local bounding sphere radius (centered on object).
Referenced by getBoundingSphereRadius(), initProperties(), setBoundingSphereRadius(), and unloadImpl().
Referenced by getIndexBufferUsage(), initProperties(), setIndexBufferPolicy(), and unloadImpl().
IndexData* render::MeshData::mIndexData [private] |
Face index data.
Referenced by getIndexData(), getRenderOperation(), initProperties(), setNewIndexData(), and unloadImpl().
Material* render::MeshData::mMaterial [private] |
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().
bool render::MeshData::mUseIndexShadowBuffer [private] |
Referenced by getUseIndexShadowBuffer(), initProperties(), setIndexBufferPolicy(), and unloadImpl().
bool render::MeshData::mUseVertexShadowBuffer [private] |
Referenced by getUseVertexShadowBuffer(), initProperties(), setVertexBufferPolicy(), and unloadImpl().
Referenced by getVertexBufferUsage(), initProperties(), setVertexBufferPolicy(), and unloadImpl().
VertexData* render::MeshData::mVertexData [private] |
Dedicated vertex data.
Referenced by getRenderOperation(), getVertexData(), initProperties(), setNewVertexData(), and unloadImpl().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by
Doxygen
(1.7.4)
|