|
Public Types |
enum | Endian { ENDIAN_NATIVE,
ENDIAN_BIG,
ENDIAN_LITTLE
} |
| The endianness of written files. More...
|
Public Member Functions |
| MeshSerializerImpl () |
virtual | ~MeshSerializerImpl () |
void | exportMesh (const Mesh *pMesh, const String &filename, Endian endianMode=ENDIAN_NATIVE) |
| Exports a mesh to the file specified.
|
void | importMesh (DataStreamPtr &stream, Mesh *pDest) |
| Imports Mesh and (optionally) Material data from a .mesh file DataStream.
|
Protected Member Functions |
virtual void | writeSubMeshNameTable (const Mesh *pMesh) |
virtual void | writeMesh (const Mesh *pMesh) |
virtual void | writeSubMesh (const SubMesh *s) |
virtual void | writeSubMeshOperation (const SubMesh *s) |
virtual void | writeSubMeshTextureAliases (const SubMesh *s) |
virtual void | writeGeometry (const VertexData *pGeom) |
virtual void | writeSkeletonLink (const String &skelName) |
virtual void | writeMeshBoneAssignment (const VertexBoneAssignment &assign) |
virtual void | writeSubMeshBoneAssignment (const VertexBoneAssignment &assign) |
virtual void | writeLodInfo (const Mesh *pMesh) |
virtual void | writeLodSummary (unsigned short numLevels, bool manual) |
virtual void | writeLodUsageManual (const MeshLodUsage &usage) |
virtual void | writeLodUsageGenerated (const Mesh *pMesh, const MeshLodUsage &usage, unsigned short lodNum) |
virtual void | writeBoundsInfo (const Mesh *pMesh) |
virtual void | writeEdgeList (const Mesh *pMesh) |
virtual void | writeAnimations (const Mesh *pMesh) |
virtual void | writeAnimation (const Animation *anim) |
virtual void | writePoses (const Mesh *pMesh) |
virtual void | writePose (const Pose *pose) |
virtual void | writeAnimationTrack (const VertexAnimationTrack *track) |
virtual void | writeMorphKeyframe (const VertexMorphKeyFrame *kf, size_t vertexCount) |
virtual void | writePoseKeyframe (const VertexPoseKeyFrame *kf) |
virtual void | writePoseKeyframePoseRef (const VertexPoseKeyFrame::PoseRef &poseRef) |
virtual size_t | calcMeshSize (const Mesh *pMesh) |
virtual size_t | calcSubMeshSize (const SubMesh *pSub) |
virtual size_t | calcGeometrySize (const VertexData *pGeom) |
virtual size_t | calcSkeletonLinkSize (const String &skelName) |
virtual size_t | calcBoneAssignmentSize (void) |
virtual size_t | calcSubMeshOperationSize (const SubMesh *pSub) |
virtual size_t | calcSubMeshNameTableSize (const Mesh *pMesh) |
virtual size_t | calcEdgeListSize (const Mesh *pMesh) |
virtual size_t | calcEdgeListLodSize (const EdgeData *data, bool isManual) |
virtual size_t | calcEdgeGroupSize (const EdgeData::EdgeGroup &group) |
virtual size_t | calcPosesSize (const Mesh *pMesh) |
virtual size_t | calcPoseSize (const Pose *pose) |
virtual size_t | calcAnimationsSize (const Mesh *pMesh) |
virtual size_t | calcAnimationSize (const Animation *anim) |
virtual size_t | calcAnimationTrackSize (const VertexAnimationTrack *track) |
virtual size_t | calcMorphKeyframeSize (const VertexMorphKeyFrame *kf, size_t vertexCount) |
virtual size_t | calcPoseKeyframeSize (const VertexPoseKeyFrame *kf) |
virtual size_t | calcPoseKeyframePoseRefSize (void) |
virtual size_t | calcPoseVertexSize (void) |
virtual size_t | calcSubMeshTextureAliasesSize (const SubMesh *pSub) |
virtual void | readTextureLayer (DataStreamPtr &stream, Mesh *pMesh, MaterialPtr &pMat) |
virtual void | readSubMeshNameTable (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readMesh (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readSubMesh (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readSubMeshOperation (DataStreamPtr &stream, Mesh *pMesh, SubMesh *sub) |
virtual void | readSubMeshTextureAlias (DataStreamPtr &stream, Mesh *pMesh, SubMesh *sub) |
virtual void | readGeometry (DataStreamPtr &stream, Mesh *pMesh, VertexData *dest) |
virtual void | readGeometryVertexDeclaration (DataStreamPtr &stream, Mesh *pMesh, VertexData *dest) |
virtual void | readGeometryVertexElement (DataStreamPtr &stream, Mesh *pMesh, VertexData *dest) |
virtual void | readGeometryVertexBuffer (DataStreamPtr &stream, Mesh *pMesh, VertexData *dest) |
virtual void | readSkeletonLink (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readMeshBoneAssignment (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readSubMeshBoneAssignment (DataStreamPtr &stream, Mesh *pMesh, SubMesh *sub) |
virtual void | readMeshLodInfo (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readMeshLodUsageManual (DataStreamPtr &stream, Mesh *pMesh, unsigned short lodNum, MeshLodUsage &usage) |
virtual void | readMeshLodUsageGenerated (DataStreamPtr &stream, Mesh *pMesh, unsigned short lodNum, MeshLodUsage &usage) |
virtual void | readBoundsInfo (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readEdgeList (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readPoses (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readPose (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readAnimations (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readAnimation (DataStreamPtr &stream, Mesh *pMesh) |
virtual void | readAnimationTrack (DataStreamPtr &stream, Animation *anim, Mesh *pMesh) |
virtual void | readMorphKeyFrame (DataStreamPtr &stream, VertexAnimationTrack *track) |
virtual void | readPoseKeyFrame (DataStreamPtr &stream, VertexAnimationTrack *track) |
virtual void | flipFromLittleEndian (void *pData, size_t vertexCount, size_t vertexSize, const VertexDeclaration::VertexElementList &elems) |
| Flip an entire vertex buffer from little endian.
|
virtual void | flipToLittleEndian (void *pData, size_t vertexCount, size_t vertexSize, const VertexDeclaration::VertexElementList &elems) |
| Flip an entire vertex buffer to little endian.
|
virtual void | flipEndian (void *pData, size_t vertexCount, size_t vertexSize, const VertexDeclaration::VertexElementList &elems) |
| Flip the endianness of an entire vertex buffer, passed in as a pointer to locked or temporary memory.
|
virtual void | writeFileHeader (void) |
virtual void | writeChunkHeader (uint16 id, uint32 size) |
void | writeFloats (const float *const pfloat, size_t count) |
void | writeFloats (const double *const pfloat, size_t count) |
void | writeShorts (const uint16 *const pShort, size_t count) |
void | writeInts (const uint32 *const pInt, size_t count) |
void | writeBools (const bool *const pLong, size_t count) |
void | writeObject (const Vector3 &vec) |
void | writeObject (const Quaternion &q) |
void | writeString (const String &string) |
void | writeData (const void *const buf, size_t size, size_t count) |
virtual void | readFileHeader (DataStreamPtr &stream) |
virtual unsigned short | readChunk (DataStreamPtr &stream) |
void | readBools (DataStreamPtr &stream, bool *pDest, size_t count) |
void | readFloats (DataStreamPtr &stream, float *pDest, size_t count) |
void | readFloats (DataStreamPtr &stream, double *pDest, size_t count) |
void | readShorts (DataStreamPtr &stream, uint16 *pDest, size_t count) |
void | readInts (DataStreamPtr &stream, uint32 *pDest, size_t count) |
void | readObject (DataStreamPtr &stream, Vector3 &pDest) |
void | readObject (DataStreamPtr &stream, Quaternion &pDest) |
String | readString (DataStreamPtr &stream) |
String | readString (DataStreamPtr &stream, size_t numChars) |
virtual void | flipToLittleEndian (void *pData, size_t size, size_t count=1) |
virtual void | flipFromLittleEndian (void *pData, size_t size, size_t count=1) |
virtual void | flipEndian (void *pData, size_t size, size_t count) |
virtual void | flipEndian (void *pData, size_t size) |
virtual void | determineEndianness (DataStreamPtr &stream) |
| Determine the endianness of the incoming stream compared to native.
|
virtual void | determineEndianness (Endian requestedEndian) |
| Determine the endianness to write with based on option.
|
Protected Attributes |
bool | mIsSkeletallyAnimated |
uint32 | mCurrentstreamLen |
FILE * | mpfFile |
String | mVersion |
bool | mFlipEndian |