120 void organiseTangentsBuffer(
VertexData *vertexData,
122 unsigned short sourceTexCoordSet);
153 void buildIndexMap(
const VertexBoneAssignmentList& boneAssignments,
154 IndexMap& boneIndexToBlendIndexMap, IndexMap& blendIndexToBoneIndexMap);
156 void compileBoneAssignments(
const VertexBoneAssignmentList& boneAssignments,
157 unsigned short numBlendWeightsPerVertex,
158 IndexMap& blendIndexToBoneIndexMap,
196 void prepareImpl(
void);
199 void unprepareImpl(
void);
203 void postLoadImpl(
void);
205 void unloadImpl(
void);
207 size_t calculateSize(
void)
const;
209 void mergeAdjacentTexcoords(
unsigned short finalTexCoordSet,
210 unsigned short texCoordSetToDestroy,
VertexData *vertexData );
243 void unnameSubMesh(
const String& name);
254 unsigned short getNumSubMeshes(
void)
const;
258 SubMesh* getSubMesh(
unsigned short index)
const;
270 void destroySubMesh(
unsigned short index);
278 void destroySubMesh(
const String& name);
283 {
return SubMeshIterator(mSubMeshList.begin(), mSubMeshList.end()); }
335 Real getBoundingSphereRadius(
void)
const;
354 void _setBoundingSphereRadius(
Real radius);
367 void setSkeletonName(
const String& skelName);
370 bool hasSkeleton(
void)
const;
374 bool hasVertexAnimation(
void)
const;
383 const String& getSkeletonName(
void)
const;
414 void clearBoneAssignments(
void);
427 BoneAssignmentIterator getBoneAssignmentIterator(
void);
438 ushort getNumLodLevels(
void)
const;
467 void updateManualLodLevel(
ushort index,
const String& meshName);
486 void _setLodInfo(
unsigned short numLevels,
bool isManual);
488 void _setLodUsage(
unsigned short level,
MeshLodUsage& usage);
490 void _setSubMeshLodFaceList(
unsigned short subIdx,
unsigned short level,
IndexData* facedata);
493 void removeLodLevels(
void);
571 unsigned short _rationaliseBoneAssignments(
size_t vertexCount, VertexBoneAssignmentList& assignments);
580 void _compileBoneAssignments(
void);
587 void _updateCompiledBoneAssignments(
void);
604 void mergeAdjacentTexcoords(
unsigned short finalTexCoordSet,
unsigned short texCoordSetToDestroy );
606 void _configureMeshLodUsage(
const LodConfig& lodConfig);
641 unsigned short sourceTexCoordSet = 0,
unsigned short index = 0,
642 bool splitMirrored =
false,
bool splitRotated =
false,
bool storeParityInW =
false);
666 unsigned short& outSourceCoordSet,
unsigned short& outIndex);
671 void buildEdgeList(
void);
673 void freeEdgeList(
void);
693 void prepareForShadowVolume(
void);
702 EdgeData* getEdgeList(
unsigned short lodIndex = 0);
711 const EdgeData* getEdgeList(
unsigned short lodIndex = 0)
const;
734 static void prepareMatricesForVertexBlend(
const Matrix4** blendMatrices,
735 const Matrix4* boneMatrices,
const IndexMap& indexMap);
760 static void softwareVertexBlend(
const VertexData* sourceVertexData,
762 const Matrix4*
const* blendMatrices,
size_t numMatrices,
781 static void softwareVertexMorph(
Real t,
805 static void softwareVertexPoseBlend(
Real weight,
858 virtual bool hasAnimation(
const String& name)
const;
861 virtual void removeAnimation(
const String& name);
864 virtual unsigned short getNumAnimations(
void)
const;
868 virtual Animation* getAnimation(
unsigned short index)
const;
871 virtual void removeAllAnimations(
void);
877 VertexData* getVertexDataByTrackHandle(
unsigned short handle);
889 void updateMaterialForAllSubMeshes(
void);
895 void _determineAnimationTypes(
void)
const;
919 void removePose(
ushort index);
924 void removePose(
const String& name);
926 void removeAllPoses(
void);
932 PoseIterator getPoseIterator(
void);
934 ConstPoseIterator getPoseIterator(
void)
const;
936 const PoseList& getPoseList(
void)
const;
IndexMap sharedBlendIndexToBoneIndexMap
Shared index map for translating blend index to bone index.
A way of recording the way each LODs is recorded this Mesh.
bool isLodManual(void) const
Returns true if this mesh is using manual LOD.
Concrete IteratorWrapper for nonconst access to the underlying container.
void setAutoBuildEdgeLists(bool autobuild)
Sets whether or not this Mesh should automatically build edge lists when asked for them...
bool isEdgeListBuilt(void) const
Returns whether this mesh has an attached edge list.
String manualName
Only relevant if mIsLodManual is true, the name of the alternative mesh to use.
Real value
Value used by to determine when this LOD applies.
Strategy for determining level of detail.
VertexAnimationType mSharedVertexDataAnimationType
The vertex animation type associated with the shared vertex data.
vector< Pose * >::type PoseList
SubMeshIterator getSubMeshIterator(void)
Gets an iterator over the available submeshes.
VectorIterator< PoseList > PoseIterator
bool mPreparedForShadowVolumes
Summary class collecting together vertex source information.
Real mBoundRadius
Local bounding sphere radius (centered on object).
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
vector< SubMesh * >::type SubMeshList
HardwareBuffer::Usage mIndexBufferUsage
multimap< size_t, VertexBoneAssignment >::type VertexBoneAssignmentList
Multimap of vertex bone assignments (orders by vertex index).
float Real
Software floating point type.
SubMeshList mSubMeshList
A list of submeshes which make up this mesh.
Summary class collecting together index data source information.
bool isVertexBufferShadowed(void) const
Gets whether or not this meshes vertex buffers are shadowed.
Abstract class representing a loadable resource (e.g.
bool getSharedVertexDataAnimationIncludesNormals() const
Returns whether animation on shared vertex data includes normals.
Class for providing backwards-compatibility for loading version 1.2 of the .mesh format.
Interface describing a manual resource loader.
unsigned long long int ResourceHandle
bool mPosesIncludeNormals
This class contains the information required to describe the edge connectivity of a given set of vert...
const VertexBoneAssignmentList & getBoneAssignments() const
Gets a const reference to the list of bone assignments.
Defines a part of a complete mesh.
VectorIterator< SubMeshList > SubMeshIterator
An animation container interface, which allows generic access to sibling animations.
Class encapsulating a set of AnimationState objects.
PoseList mPoseList
List of available poses for shared and dedicated geometryPoseList.
Class encapsulating a standard 4x4 homogeneous matrix.
bool mAnimationTypesDirty
Do we need to scan animations for animation types?
VertexBoneAssignmentList mBoneAssignments
Shared pointer implementation used to share vertex buffers.
VertexData * sharedVertexData
Shared vertex data.
VertexAnimationType
Type of vertex animation.
Class for providing backwards-compatibility for loading version 1.4 of the .mesh format.
vector< MeshLodUsage >::type MeshLodUsageList
String manualGroup
Only relevant if mIsLodManual is true, the name of the group of the alternative mesh.
bool isIndexBufferShadowed(void) const
Gets whether or not this meshes index buffers are shadowed.
Class for providing backwards-compatibility for loading version 1.1 of the .mesh format.
vector< Real >::type LodValueList
bool mBoneAssignmentsOutOfDate
Flag indicating that bone assignments need to be recompiled.
MeshLodUsageList mMeshLodUsageList
HashMap< String, ushort > SubMeshNameMap
A hashmap used to store optional SubMesh names.
Resource holding data about 3D mesh.
Usage
Enums describing buffer usage; not mutually exclusive.
bool mSharedVertexDataAnimationIncludesNormals
Whether vertex animation includes normals.
VertexElementSemantic
Vertex element semantics, used to identify the meaning of vertex buffer contents. ...
AnimationList mAnimationsList
const SubMeshNameMap & getSubMeshNameMap(void) const
Gets a reference to the optional name assignments of the SubMeshes.
HardwareBuffer::Usage mVertexBufferUsage
Tangent (X axis if normal is Z)
EdgeData * edgeData
Edge list for this LOD level (may be derived from manual mesh).
Defines a generic resource handler.
String mSkeletonName
Optional linked skeleton.
map< String, Animation * >::type AnimationList
Storage of morph animations, lookup by name.
const LodStrategy * mLodStrategy
Internal implementation of Mesh reading / writing for the latest version of the .mesh format...
bool mIndexBufferShadowBuffer
ConstVectorIterator< PoseList > ConstPoseIterator
bool getAutoBuildEdgeLists(void) const
Sets whether or not this Mesh should automatically build edge lists when asked for them...
Concrete IteratorWrapper for const access to the underlying container.
SubMeshNameMap mSubMeshNameMap
Real userValue
User-supplied values used to determine when th is LOD applies.
Records the assignment of a single vertex to a single bone with the corresponding weight...
MapIterator< VertexBoneAssignmentList > BoneAssignmentIterator
AxisAlignedBox mAABB
Local bounding box volume.
bool _getAnimationTypesDirty(void) const
Are the derived animation types out of date?
vector< unsigned short >::type IndexMap
size_t getPoseCount(void) const
Get the number of poses.
HardwareBuffer::Usage getIndexBufferUsage(void) const
Gets the usage setting for this meshes index buffers.
bool mVertexBufferShadowBuffer
A 3D box aligned with the x/y/z axes.
bool isPreparedForShadowVolumes(void) const
Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes...
DataStreamPtr mFreshFromDisk
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
HardwareBuffer::Usage getVertexBufferUsage(void) const
Gets the usage setting for this meshes vertex buffers.
A pose is a linked set of vertex offsets applying to one set of vertex data.
MeshPtr manualMesh
Hard link to mesh to avoid looking up each time.