#include <OGREInterfaces.h>
Inherits DigitalSpaces::DIObjectBase.
Public Member Functions | |
| DIOGRESubMesh * | CreateSubMesh (void) |
| Creates a new DIOGRESubMesh. | |
| DIOGRESubMesh * | CreateSubMesh (const char *name) |
| Creates a new DIOGRESubMesh and gives it a name. | |
| void | NameSubMesh (const char *name, unsigned short index) |
| Gives a name to a DIOGRESubMesh. | |
| unsigned short | _GetSubMeshIndex (const char *name) |
| Gets the index of a submesh with a given name. | |
| unsigned short | GetNumSubMeshes (void) |
| Gets the number of sub meshes which comprise this mesh. | |
| DIOGRESubMesh * | GetSubMesh (unsigned short index) |
| Gets a pointer to the submesh indicated by the index. | |
| DIOGRESubMesh * | GetSubMesh (const char *name) |
| Gets a DIOGRESubMesh by name. | |
| DIOGREMesh * | Clone (const char *newName) |
| Makes a copy of this mesh object and gives it a new name. | |
| DIOGREMesh * | Clone (const char *newName, const char *newGroup) |
| DIOGREAxisAlignedBox * | GetBounds (void) |
| Get the axis-aligned bounding box for this mesh. | |
| float | GetBoundingSphereRadius (void) |
| Gets the radius of the bounding sphere surrounding this mesh. | |
| void | _SetBounds (DIOGREAxisAlignedBox *bounds) |
| Manually set the bounding box for this Mesh. | |
| void | _SetBounds (DIOGREAxisAlignedBox *bounds, bool pad) |
| void | _SetBoundingSphereRadius (float radius) |
| Manually set the bounding radius. | |
| void | SetSkeletonName (const char *skelName) |
| Sets the name of the skeleton this Mesh uses for animation. | |
| bool | HasSkeleton (void) |
| Returns true if this Mesh has a linked Skeleton. | |
| const DIOGRESkeleton * | GetSkeleton (void) |
| Gets a pointer to any linked Skeleton. | |
| const char * | GetSkeletonName (void) |
| Gets the name of any linked Skeleton. | |
| void | AddBoneAssignment (OGREVertexBoneAssignment *vertBoneAssign) |
| Assigns a vertex to a bone with a given weight, for skeletal animation. | |
| void | ClearBoneAssignments (void) |
| Removes all bone assignments for this mesh. | |
| unsigned short | GetNumLodLevels (void) |
| Gets an iterator for access all bone assignments. | |
| void | GetLodLevel (unsigned short index, OGREMeshLodUsage *outMeshLODUsage) |
| Gets details of the numbered level of detail entry. | |
| void | CreateManualLodLevel (float fromDepth, const char *meshName) |
| Adds a new manual level-of-detail entry to this Mesh. | |
| void | UpdateManualLodLevel (unsigned short index, const char *meshName) |
| Changes the alternate mesh to use as a manual LOD at the given index. | |
| unsigned short | GetLodIndex (float depth) |
| Retrieves the level of detail index for the given depth value. | |
| unsigned short | GetLodIndexSquaredDepth (float squaredDepth) |
| Retrieves the level of detail index for the given squared depth value. | |
| bool | IsLodManual (void) |
| Returns true if this mesh is using manual LOD. | |
| void | RemoveLodLevels (void) |
| Removes all LOD data from this Mesh. | |
| void | SetVertexBufferPolicy (OGREHardwareBufferUsage usage) |
| Sets the policy for the vertex buffers to be used when loading this Mesh. | |
| void | SetVertexBufferPolicy (OGREHardwareBufferUsage usage, bool shadowBuffer) |
| void | SetIndexBufferPolicy (OGREHardwareBufferUsage usage) |
| Sets the policy for the index buffers to be used when loading this Mesh. | |
| void | SetIndexBufferPolicy (OGREHardwareBufferUsage usage, bool shadowBuffer) |
| OGREHardwareBufferUsage | GetVertexBufferUsage (void) |
| Gets the usage setting for this meshes vertex buffers. | |
| OGREHardwareBufferUsage | GetIndexBufferUsage (void) |
| Gets the usage setting for this meshes index buffers. | |
| bool | IsVertexBufferShadowed (void) |
| Gets whether or not this meshes vertex buffers are shadowed. | |
| bool | IsIndexBufferShadowed (void) |
| Gets whether or not this meshes index buffers are shadowed. | |
| void | BuildTangentVectors (void) |
| Rationalises the passed in bone assignment list. | |
| void | BuildTangentVectors (unsigned short sourceTexCoordSet, unsigned short destTexCoordSet) |
| bool | SuggestTangentVectorBuildParams (unsigned short *outSourceCoordSet, unsigned short *outDestCoordSet) |
| Ask the mesh to suggest parameters to a future buildTangentVectors call. | |
| void | BuildEdgeList (void) |
| Builds an edge list for this mesh, which can be used for generating a shadow volume among other things. | |
| void | FreeEdgeList (void) |
| Destroys and frees the edge lists this mesh has built. | |
| void | PrepareForShadowVolume (void) |
| This method prepares the mesh for generating a renderable shadow volume. | |
| bool | IsPreparedForShadowVolumes (void) |
| Return the edge list for this mesh, building it if required. | |
| bool | IsEdgeListBuilt (void) |
| Returns whether this mesh has an attached edge list. | |
| void | SetAutoBuildEdgeLists (bool autobuild) |
| Gets a reference to the optional name assignments of the SubMeshes. | |
| bool | GetAutoBuildEdgeLists (void) |
| Sets whether or not this Mesh should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided. | |
| DIOGRESubMesh* DigitalSpaces::DIOGREMesh::CreateSubMesh | ( | void | ) |
Creates a new DIOGRESubMesh.
| DIOGRESubMesh* DigitalSpaces::DIOGREMesh::CreateSubMesh | ( | const char * | name | ) |
Creates a new DIOGRESubMesh and gives it a name.
| void DigitalSpaces::DIOGREMesh::NameSubMesh | ( | const char * | name, | |
| unsigned short | index | |||
| ) |
Gives a name to a DIOGRESubMesh.
| unsigned short DigitalSpaces::DIOGREMesh::_GetSubMeshIndex | ( | const char * | name | ) |
Gets the index of a submesh with a given name.
| unsigned short DigitalSpaces::DIOGREMesh::GetNumSubMeshes | ( | void | ) |
Gets the number of sub meshes which comprise this mesh.
| DIOGRESubMesh* DigitalSpaces::DIOGREMesh::GetSubMesh | ( | unsigned short | index | ) |
Gets a pointer to the submesh indicated by the index.
| DIOGRESubMesh* DigitalSpaces::DIOGREMesh::GetSubMesh | ( | const char * | name | ) |
Gets a DIOGRESubMesh by name.
| DIOGREMesh* DigitalSpaces::DIOGREMesh::Clone | ( | const char * | newName | ) |
Makes a copy of this mesh object and gives it a new name.
| newName | The name to give the clone | |
| newGroup | Optional name of the new group to assign the clone to; if you leave this blank, the clone will be assigned to the same group as this Mesh. |
| DIOGREMesh* DigitalSpaces::DIOGREMesh::Clone | ( | const char * | newName, | |
| const char * | newGroup | |||
| ) |
| DIOGREAxisAlignedBox* DigitalSpaces::DIOGREMesh::GetBounds | ( | void | ) |
Get the axis-aligned bounding box for this mesh.
| float DigitalSpaces::DIOGREMesh::GetBoundingSphereRadius | ( | void | ) |
Gets the radius of the bounding sphere surrounding this mesh.
| void DigitalSpaces::DIOGREMesh::_SetBounds | ( | DIOGREAxisAlignedBox * | bounds | ) |
Manually set the bounding box for this Mesh.
| pad | If true, a certain padding will be added to the bounding box to separate it from the mesh |
| void DigitalSpaces::DIOGREMesh::_SetBounds | ( | DIOGREAxisAlignedBox * | bounds, | |
| bool | pad | |||
| ) |
| void DigitalSpaces::DIOGREMesh::_SetBoundingSphereRadius | ( | float | radius | ) |
Manually set the bounding radius.
| void DigitalSpaces::DIOGREMesh::SetSkeletonName | ( | const char * | skelName | ) |
Sets the name of the skeleton this Mesh uses for animation.
| skelName | The name of the .skeleton file to use, or an empty string to use no skeleton |
| bool DigitalSpaces::DIOGREMesh::HasSkeleton | ( | void | ) |
Returns true if this Mesh has a linked Skeleton.
| const DIOGRESkeleton* DigitalSpaces::DIOGREMesh::GetSkeleton | ( | void | ) |
Gets a pointer to any linked Skeleton.
| const char* DigitalSpaces::DIOGREMesh::GetSkeletonName | ( | void | ) |
Gets the name of any linked Skeleton.
| void DigitalSpaces::DIOGREMesh::AddBoneAssignment | ( | OGREVertexBoneAssignment * | vertBoneAssign | ) |
Assigns a vertex to a bone with a given weight, for skeletal animation.
| void DigitalSpaces::DIOGREMesh::ClearBoneAssignments | ( | void | ) |
Removes all bone assignments for this mesh.
| unsigned short DigitalSpaces::DIOGREMesh::GetNumLodLevels | ( | void | ) |
Gets an iterator for access all bone assignments.
Automatically generates lower level of detail versions of this mesh for use when a simpler version of the model is acceptable for rendering.
| lodDistances | A list of depth values indicating the distances at which new lods should be generated. | |
| reductionMethod | The way to determine the number of vertices collapsed per LOD | |
| reductionValue | Meaning depends on reductionMethod, typically either the proportion of remaining vertices to collapse or a fixed number of vertices. Returns the number of levels of detail that this mesh supports. |
| void DigitalSpaces::DIOGREMesh::GetLodLevel | ( | unsigned short | index, | |
| OGREMeshLodUsage * | outMeshLODUsage | |||
| ) |
Gets details of the numbered level of detail entry.
| void DigitalSpaces::DIOGREMesh::CreateManualLodLevel | ( | float | fromDepth, | |
| const char * | meshName | |||
| ) |
Adds a new manual level-of-detail entry to this Mesh.
| fromDepth | The z value from which this Lod will apply. | |
| meshName | The name of the mesh which will be the lower level detail version. |
| void DigitalSpaces::DIOGREMesh::UpdateManualLodLevel | ( | unsigned short | index, | |
| const char * | meshName | |||
| ) |
Changes the alternate mesh to use as a manual LOD at the given index.
| index | The index of the level to be changed | |
| meshName | The name of the mesh which will be the lower level detail version. |
| unsigned short DigitalSpaces::DIOGREMesh::GetLodIndex | ( | float | depth | ) |
Retrieves the level of detail index for the given depth value.
| unsigned short DigitalSpaces::DIOGREMesh::GetLodIndexSquaredDepth | ( | float | squaredDepth | ) |
Retrieves the level of detail index for the given squared depth value.
| bool DigitalSpaces::DIOGREMesh::IsLodManual | ( | void | ) |
Returns true if this mesh is using manual LOD.
| void DigitalSpaces::DIOGREMesh::RemoveLodLevels | ( | void | ) |
Removes all LOD data from this Mesh.
| void DigitalSpaces::DIOGREMesh::SetVertexBufferPolicy | ( | OGREHardwareBufferUsage | usage | ) |
Sets the policy for the vertex buffers to be used when loading this Mesh.
| usage | The usage flags, which by default are HardwareBuffer::HBU_STATIC_WRITE_ONLY | |
| shadowBuffer | 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. |
| void DigitalSpaces::DIOGREMesh::SetVertexBufferPolicy | ( | OGREHardwareBufferUsage | usage, | |
| bool | shadowBuffer | |||
| ) |
| void DigitalSpaces::DIOGREMesh::SetIndexBufferPolicy | ( | OGREHardwareBufferUsage | usage | ) |
Sets the policy for the index buffers to be used when loading this Mesh.
| usage | The usage flags, which by default are HardwareBuffer::HBU_STATIC_WRITE_ONLY | |
| shadowBuffer | If set to true, the index 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. |
| void DigitalSpaces::DIOGREMesh::SetIndexBufferPolicy | ( | OGREHardwareBufferUsage | usage, | |
| bool | shadowBuffer | |||
| ) |
| OGREHardwareBufferUsage DigitalSpaces::DIOGREMesh::GetVertexBufferUsage | ( | void | ) |
Gets the usage setting for this meshes vertex buffers.
| OGREHardwareBufferUsage DigitalSpaces::DIOGREMesh::GetIndexBufferUsage | ( | void | ) |
Gets the usage setting for this meshes index buffers.
| bool DigitalSpaces::DIOGREMesh::IsVertexBufferShadowed | ( | void | ) |
Gets whether or not this meshes vertex buffers are shadowed.
| bool DigitalSpaces::DIOGREMesh::IsIndexBufferShadowed | ( | void | ) |
Gets whether or not this meshes index buffers are shadowed.
| void DigitalSpaces::DIOGREMesh::BuildTangentVectors | ( | void | ) |
Rationalises the passed in bone assignment list.
| vertexCount | The number of vertices. | |
| assignments | The bone assignment list to rationalise. This list will be modified and entries will be removed where the limits are exceeded. |
Tangent vectors are vectors representing the local 'X' axis for a given vertex based on the orientation of the 2D texture on the geometry. They are built from a combination of existing normals, and from the 2D texture coordinates already baked into the model. They can be used for a number of things, but most of all they are useful for vertex and fragment programs, when you wish to arrive at a common space for doing per-pixel calculations.
| sourceTexCoordSet | The texture coordinate index which should be used as the source of 2D texture coordinates, with which to calculate the tangents. | |
| destTexCoordSet | The texture coordinate set which should be used to store the 3D coordinates representing a tangent vector per vertex. If this already exists, it will be overwritten. |
| void DigitalSpaces::DIOGREMesh::BuildTangentVectors | ( | unsigned short | sourceTexCoordSet, | |
| unsigned short | destTexCoordSet | |||
| ) |
| bool DigitalSpaces::DIOGREMesh::SuggestTangentVectorBuildParams | ( | unsigned short * | outSourceCoordSet, | |
| unsigned short * | outDestCoordSet | |||
| ) |
Ask the mesh to suggest parameters to a future buildTangentVectors call.
| outSourceCoordSet | Reference to a source texture coordinate set which will be populated | |
| outDestCoordSet | Reference to a destination texture coordinate set which will be populated |
| void DigitalSpaces::DIOGREMesh::BuildEdgeList | ( | void | ) |
Builds an edge list for this mesh, which can be used for generating a shadow volume among other things.
| void DigitalSpaces::DIOGREMesh::FreeEdgeList | ( | void | ) |
Destroys and frees the edge lists this mesh has built.
| void DigitalSpaces::DIOGREMesh::PrepareForShadowVolume | ( | void | ) |
This method prepares the mesh for generating a renderable shadow volume.
| bool DigitalSpaces::DIOGREMesh::IsPreparedForShadowVolumes | ( | void | ) |
Return the edge list for this mesh, building it if required.
You must ensure that the Mesh as been prepared for shadow volume rendering if you intend to use this information for that purpose. The LOD at which to get the edge list, 0 being the highest. Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes.
| bool DigitalSpaces::DIOGREMesh::IsEdgeListBuilt | ( | void | ) |
Returns whether this mesh has an attached edge list.
| void DigitalSpaces::DIOGREMesh::SetAutoBuildEdgeLists | ( | bool | autobuild | ) |
Gets a reference to the optional name assignments of the SubMeshes.
Sets whether or not this Mesh should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.
| bool DigitalSpaces::DIOGREMesh::GetAutoBuildEdgeLists | ( | void | ) |
Sets whether or not this Mesh should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.
1.5.6