|
Public Types |
enum | Endian { ENDIAN_NATIVE,
ENDIAN_BIG,
ENDIAN_LITTLE
} |
| The endianness of written files. More...
|
Public Member Functions |
| MeshSerializer () |
virtual | ~MeshSerializer () |
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 Types |
typedef std::map< String,
MeshSerializerImpl * > | MeshSerializerImplMap |
Protected Member Functions |
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 |
MeshSerializerImplMap | mImplementations |
uint32 | mCurrentstreamLen |
FILE * | mpfFile |
String | mVersion |
bool | mFlipEndian |
Static Protected Attributes |
String | msCurrentVersion |