Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::SubMesh Class Reference

This class represents a sub-section of an overall mesh. More...

#include <submesh.h>

Public Member Functions

 SubMesh (Ogre::SubMesh *Internal)
 Internal Constructor. More...
 
 ~SubMesh ()
 Class Destructor.
 
Ogre::SubMesh * _GetInternalSubMesh () const
 Gets the internal SubMesh pointer. More...
 
void AppendIndexInfo (IntVec &ToFill) const
 Gets the Index information of this SubMesh and appends it to the container provided. More...
 
void AppendVertexInfo (VertexInfo &ToFill) const
 Gets the vertex information of this SubMesh and appends it to the VertexInfo provided. More...
 
void AppendVertexNormalInfo (Vector3Vec &ToFill) const
 Gets the vertex normal information of this SubMesh and appends it to the container provided. More...
 
void AppendVertexPositionInfo (Vector3Vec &ToFill) const
 Gets the vertex position information of this SubMesh and appends it to the container provided. More...
 
void AppendVertexTangentInfo (Vector3Vec &ToFill) const
 Gets the vertex tangent information of this SubMesh and appends it to the container provided. More...
 
void AppendVertexTexCoordInfo (Vector2Vec &ToFill) const
 Gets the vertex texture coordinate information of this SubMesh and appends it to the container provided. More...
 
Whole GetIndexCount () const
 Gets the number of Indices in this SubMesh. More...
 
void GetInfo (MeshInfo &ToFill) const
 Gets the information used to render this SubMesh. More...
 
const StringGetMaterialName () const
 Gets the name of the Material being used by this SubMesh. More...
 
Whole GetVertexCount () const
 Gets the number of Vertices in this SubMesh. More...
 
void SetMaterialName (const String &MatName)
 Sets the name of the Material to be used by this SubMesh. More...
 
Boole UsesSharedVertices () const
 Gets whether or not this SubMesh shares a Vertex Buffer with other SubMeshes. More...
 

Protected Attributes

Ogre::SubMesh * InternalSubMesh
 A pointer to the internal SubMesh this is based on. More...
 

Detailed Description

This class represents a sub-section of an overall mesh.

Every mesh has at least one SubMesh. Most meshes have only 1 or 2. SubMeshes are often implemented in cases where one portion of the mesh needs to be animated or given a different material then another portion.

Definition at line 61 of file submesh.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::SubMesh::SubMesh ( Ogre::SubMesh *  Internal)

Internal Constructor.

Parameters
InternalThe internal SubMesh this SubMesh class is based on.

Definition at line 52 of file submesh.cpp.

Member Function Documentation

Ogre::SubMesh * Mezzanine::Graphics::SubMesh::_GetInternalSubMesh ( ) const

Gets the internal SubMesh pointer.

Returns
Returns a pointer pointing to the internal SubMesh.

Definition at line 238 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendIndexInfo ( IntVec ToFill) const

Gets the Index information of this SubMesh and appends it to the container provided.

Parameters
ToFillThe container to append this SubMeshes Index info to.

Definition at line 214 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendVertexInfo ( VertexInfo ToFill) const

Gets the vertex information of this SubMesh and appends it to the VertexInfo provided.

Parameters
ToFillThe VertexInfo struct to have this SubMesh vertex information added to.

Definition at line 106 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendVertexNormalInfo ( Vector3Vec ToFill) const

Gets the vertex normal information of this SubMesh and appends it to the container provided.

Parameters
ToFillThe container to append this SubMeshes vertex normal info to.

Definition at line 166 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendVertexPositionInfo ( Vector3Vec ToFill) const

Gets the vertex position information of this SubMesh and appends it to the container provided.

Parameters
ToFillThe container to append this SubMeshes vertex position info to.

Definition at line 119 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendVertexTangentInfo ( Vector3Vec ToFill) const

Gets the vertex tangent information of this SubMesh and appends it to the container provided.

Parameters
ToFillThe container to append this SubMeshes vertex tangent info to.

Definition at line 190 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::AppendVertexTexCoordInfo ( Vector2Vec ToFill) const

Gets the vertex texture coordinate information of this SubMesh and appends it to the container provided.

Parameters
ToFillThe container to append this SubMeshes vertex texture coordinate info to.

Definition at line 143 of file submesh.cpp.

Whole Mezzanine::Graphics::SubMesh::GetIndexCount ( ) const

Gets the number of Indices in this SubMesh.

Returns
Returns the number of Indices used to assemble the vertices in this SubMesh.

Definition at line 79 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::GetInfo ( MeshInfo ToFill) const

Gets the information used to render this SubMesh.

Remarks
This method makes no attempt to clear any pre-existing data on the MeshInfo struct before use. Relevant data will be overwritten.
Parameters
ToFillThe MeshInfo struct to be populated with data from this SubMesh.
Todo:
Should probably be replaced with something that calls our material manager.

Definition at line 87 of file submesh.cpp.

const String & Mezzanine::Graphics::SubMesh::GetMaterialName ( ) const

Gets the name of the Material being used by this SubMesh.

Returns
Returns a const reference to a String containing the name of the Material to be used with this SubMesh.

Definition at line 67 of file submesh.cpp.

Whole Mezzanine::Graphics::SubMesh::GetVertexCount ( ) const

Gets the number of Vertices in this SubMesh.

Returns
Returns the number of Vertices that make up this SubMesh.

Definition at line 73 of file submesh.cpp.

void Mezzanine::Graphics::SubMesh::SetMaterialName ( const String MatName)

Sets the name of the Material to be used by this SubMesh.

Parameters
MatNameThe name of the Material to be applied to this SubMesh.

Definition at line 64 of file submesh.cpp.

Boole Mezzanine::Graphics::SubMesh::UsesSharedVertices ( ) const

Gets whether or not this SubMesh shares a Vertex Buffer with other SubMeshes.

Remarks
A Mesh can only have a single shared buffer across all SubMeshes. So if any SubMesh does use a shared buffer, all of the SubMeshes that do share one, share the same buffer.
Returns
Returns true if this SubMesh uses a shared Vertex Buffer with other SubMeshes.

Definition at line 70 of file submesh.cpp.

Member Data Documentation

Ogre::SubMesh* Mezzanine::Graphics::SubMesh::InternalSubMesh
protected

A pointer to the internal SubMesh this is based on.

Definition at line 66 of file submesh.h.


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