![]() |
OGRE
13.6
Object-Oriented Graphics Rendering Engine
|
Defines a part of a complete mesh. More...
#include <OgreSubMesh.h>
Public Types | |
typedef ConstMapIterator< AliasTextureNamePairList > | AliasTextureIterator |
typedef MapIterator< VertexBoneAssignmentList > | BoneAssignmentIterator |
typedef std::vector< unsigned short > | IndexMap |
Dedicated index map for translate blend index to bone index (only valid if useSharedVertices = false). More... | |
typedef std::vector< IndexData * > | LODFaceList |
typedef std::multimap< size_t, VertexBoneAssignment > | VertexBoneAssignmentList |
Multimap of verex bone assignments (orders by vertex index) More... | |
Public Member Functions | |
SubMesh () | |
~SubMesh () | |
void | _compileBoneAssignments (void) |
Must be called once to compile bone assignments into geometry buffer. More... | |
void | _getRenderOperation (RenderOperation &rend, ushort lodIndex=0) |
Returns a RenderOperation structure required to render this mesh. More... | |
void | addBoneAssignment (const VertexBoneAssignment &vertBoneAssign) |
Assigns a vertex to a bone with a given weight, for skeletal animation. More... | |
void | addTextureAlias (const String &aliasName, const String &textureName) |
void | clearBoneAssignments (void) |
Removes all bone assignments for this mesh. More... | |
SubMesh * | clone (const String &newName, Mesh *parentMesh=0) |
Makes a copy of this submesh object and gives it a new name. More... | |
void | generateExtremes (size_t count) |
Generate the submesh extremes (. More... | |
AliasTextureIterator | getAliasTextureIterator (void) const |
BoneAssignmentIterator | getBoneAssignmentIterator (void) |
const VertexBoneAssignmentList & | getBoneAssignments () const |
Gets a const reference to the list of bone assignments. More... | |
const MaterialPtr & | getMaterial () const |
const String & | getMaterialName (void) const |
bool | getVertexAnimationIncludesNormals () const |
Returns whether animation on dedicated vertex data includes normals. More... | |
VertexAnimationType | getVertexAnimationType (void) const |
Get the type of any vertex animation used by dedicated geometry. More... | |
bool | hasTextureAliases (void) const |
bool | isBuildEdgesEnabled (void) const |
Returns true(by default) if the submesh should be included in the mesh EdgeList, otherwise returns false. More... | |
void | removeAllTextureAliases (void) |
void | setBuildEdgesEnabled (bool b) |
void | setMaterial (const MaterialPtr &mat) |
void | setMaterialName (const String &matName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME) |
Sets the name of the Material which this SubMesh will use. More... | |
Public Attributes | |
IndexMap | blendIndexToBoneIndexMap |
std::vector< Vector3 > | extremityPoints |
A list of extreme points on the submesh (optional). More... | |
IndexData * | indexData |
Face index data. More... | |
LODFaceList | mLodFaceList |
RenderOperation::OperationType | operationType |
The render operation type used to render this submesh. More... | |
Mesh * | parent |
Reference to parent Mesh (not a smart pointer so child does not keep parent alive). More... | |
bool | useSharedVertices |
Indicates if this submesh shares vertex data with other meshes or whether it has it's own vertices. More... | |
VertexData * | vertexData |
Dedicated vertex data (only valid if useSharedVertices = false). More... | |
Defines a part of a complete mesh.
Meshes which make up the definition of a discrete 3D object are made up of potentially multiple parts. This is because different parts of the mesh may use different materials or use different vertex formats, such that a rendering state change is required between them.
typedef std::vector<unsigned short> Ogre::SubMesh::IndexMap |
Dedicated index map for translate blend index to bone index (only valid if useSharedVertices = false).
This data is completely owned by this submesh.
typedef std::vector<IndexData*> Ogre::SubMesh::LODFaceList |
typedef std::multimap<size_t, VertexBoneAssignment> Ogre::SubMesh::VertexBoneAssignmentList |
Multimap of verex bone assignments (orders by vertex index)
Ogre::SubMesh::SubMesh | ( | ) |
Ogre::SubMesh::~SubMesh | ( | ) |
void Ogre::SubMesh::setMaterialName | ( | const String & | matName, |
const String & | groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME |
||
) |
const String& Ogre::SubMesh::getMaterialName | ( | void | ) | const |
|
inline |
|
inline |
void Ogre::SubMesh::_getRenderOperation | ( | RenderOperation & | rend, |
ushort | lodIndex = 0 |
||
) |
Returns a RenderOperation structure required to render this mesh.
rend | Reference to a RenderOperation structure to populate. |
lodIndex | The index of the LOD to use. |
void Ogre::SubMesh::addBoneAssignment | ( | const VertexBoneAssignment & | vertBoneAssign | ) |
Assigns a vertex to a bone with a given weight, for skeletal animation.
This method is only valid after calling setSkeletonName. Since this is a one-off process there exists only 'addBoneAssignment' and 'clearBoneAssignments' methods, no 'editBoneAssignment'. You should not need to modify bone assignments during rendering (only the positions of bones) and OGRE reserves the right to do some internal data reformatting of this information, depending on render system requirements.
void Ogre::SubMesh::clearBoneAssignments | ( | void | ) |
BoneAssignmentIterator Ogre::SubMesh::getBoneAssignmentIterator | ( | void | ) |
|
inline |
Gets a const reference to the list of bone assignments.
void Ogre::SubMesh::_compileBoneAssignments | ( | void | ) |
Must be called once to compile bone assignments into geometry buffer.
AliasTextureIterator Ogre::SubMesh::getAliasTextureIterator | ( | void | ) | const |
void Ogre::SubMesh::removeAllTextureAliases | ( | void | ) |
|
inline |
VertexAnimationType Ogre::SubMesh::getVertexAnimationType | ( | void | ) | const |
Get the type of any vertex animation used by dedicated geometry.
|
inline |
Returns whether animation on dedicated vertex data includes normals.
void Ogre::SubMesh::generateExtremes | ( | size_t | count | ) |
Generate the submesh extremes (.
count | Number of extreme points to compute for the submesh. |
|
inline |
Returns true(by default) if the submesh should be included in the mesh EdgeList, otherwise returns false.
void Ogre::SubMesh::setBuildEdgesEnabled | ( | bool | b | ) |
Makes a copy of this submesh object and gives it a new name.
newName | The name to give the clone. |
parentMesh | Optional mesh to make the parent of the newly created clone. If you leave this blank, the clone will be parented to the same Mesh as the original. |
VertexData* Ogre::SubMesh::vertexData |
Dedicated vertex data (only valid if useSharedVertices = false).
This data is completely owned by this submesh.
Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().
IndexData* Ogre::SubMesh::indexData |
Face index data.
Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().
IndexMap Ogre::SubMesh::blendIndexToBoneIndexMap |
LODFaceList Ogre::SubMesh::mLodFaceList |
Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().
std::vector<Vector3> Ogre::SubMesh::extremityPoints |
A list of extreme points on the submesh (optional).
These points are some arbitrary points on the mesh that are used by engine to better sort submeshes by depth. This doesn't matter much for non-transparent submeshes, as Z-buffer takes care of invisible surface culling anyway, but is pretty useful for semi-transparent submeshes because the order in which transparent submeshes must be rendered cannot be always correctly deduced from entity position.
Mesh* Ogre::SubMesh::parent |
Reference to parent Mesh (not a smart pointer so child does not keep parent alive).
bool Ogre::SubMesh::useSharedVertices |
Indicates if this submesh shares vertex data with other meshes or whether it has it's own vertices.
Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().
RenderOperation::OperationType Ogre::SubMesh::operationType |
The render operation type used to render this submesh.