Class for serialising mesh data to/from an OGRE .mesh file. More...
#include <OgreMeshSerializer.h>
Classes | |
class | MeshVersionData |
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, in the latest format. | |
void | exportMesh (const Mesh *pMesh, const String &filename, MeshVersion version, Endian endianMode=ENDIAN_NATIVE) |
Exports a mesh to the file specified, in a specific version format. | |
void | exportMesh (const Mesh *pMesh, DataStreamPtr stream, Endian endianMode=ENDIAN_NATIVE) |
Exports a mesh to the stream specified, in the latest format. | |
void | exportMesh (const Mesh *pMesh, DataStreamPtr stream, MeshVersion version, Endian endianMode=ENDIAN_NATIVE) |
Exports a mesh to the stream specified, in a specific version format. | |
void | importMesh (DataStreamPtr &stream, Mesh *pDest) |
Imports Mesh and (optionally) Material data from a .mesh file DataStream. | |
void | setListener (MeshSerializerListener *listener) |
Sets the listener for this serializer. | |
MeshSerializerListener * | getListener () |
Returns the current listener. | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Protected Types | |
typedef vector < MeshVersionData * >::type | MeshVersionDataList |
Protected Member Functions | |
virtual void | writeFileHeader (void) |
virtual void | writeChunkHeader (uint16 id, size_t 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 | |
MeshVersionDataList | mVersionData |
MeshSerializerListener * | mListener |
uint32 | mCurrentstreamLen |
DataStreamPtr | mStream |
String | mVersion |
bool | mFlipEndian |
Class for serialising mesh data to/from an OGRE .mesh file.
Definition at line 89 of file OgreMeshSerializer.h.
typedef vector<MeshVersionData*>::type Ogre::MeshSerializer::MeshVersionDataList [protected] |
Definition at line 178 of file OgreMeshSerializer.h.
enum Ogre::Serializer::Endian [inherited] |
The endianness of written files.
ENDIAN_NATIVE |
Use the platform native endian. |
ENDIAN_BIG |
Use big endian (0x1000 is serialised as 0x10 0x00). |
ENDIAN_LITTLE |
Use little endian (0x1000 is serialised as 0x00 0x10). |
Definition at line 56 of file OgreSerializer.h.
Ogre::MeshSerializer::MeshSerializer | ( | ) |
virtual Ogre::MeshSerializer::~MeshSerializer | ( | ) | [virtual] |
virtual void Ogre::Serializer::determineEndianness | ( | Endian | requestedEndian | ) | [protected, virtual, inherited] |
Determine the endianness to write with based on option.
virtual void Ogre::Serializer::determineEndianness | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
Determine the endianness of the incoming stream compared to native.
void Ogre::MeshSerializer::exportMesh | ( | const Mesh * | pMesh, | |
DataStreamPtr | stream, | |||
MeshVersion | version, | |||
Endian | endianMode = ENDIAN_NATIVE | |||
) |
Exports a mesh to the stream specified, in a specific version format.
void Ogre::MeshSerializer::exportMesh | ( | const Mesh * | pMesh, | |
DataStreamPtr | stream, | |||
Endian | endianMode = ENDIAN_NATIVE | |||
) |
Exports a mesh to the stream specified, in the latest format.
pMesh | Pointer to the Mesh to export | |
stream | Writeable stream | |
endianMode | The endian mode of the written file |
void Ogre::MeshSerializer::exportMesh | ( | const Mesh * | pMesh, | |
const String & | filename, | |||
MeshVersion | version, | |||
Endian | endianMode = ENDIAN_NATIVE | |||
) |
Exports a mesh to the file specified, in a specific version format.
void Ogre::MeshSerializer::exportMesh | ( | const Mesh * | pMesh, | |
const String & | filename, | |||
Endian | endianMode = ENDIAN_NATIVE | |||
) |
Exports a mesh to the file specified, in the latest format.
pMesh | Pointer to the Mesh to export | |
filename | The destination filename | |
endianMode | The endian mode of the written file |
virtual void Ogre::Serializer::flipEndian | ( | void * | pData, | |
size_t | size | |||
) | [protected, virtual, inherited] |
virtual void Ogre::Serializer::flipEndian | ( | void * | pData, | |
size_t | size, | |||
size_t | count | |||
) | [protected, virtual, inherited] |
virtual void Ogre::Serializer::flipFromLittleEndian | ( | void * | pData, | |
size_t | size, | |||
size_t | count = 1 | |||
) | [protected, virtual, inherited] |
virtual void Ogre::Serializer::flipToLittleEndian | ( | void * | pData, | |
size_t | size, | |||
size_t | count = 1 | |||
) | [protected, virtual, inherited] |
MeshSerializerListener* Ogre::MeshSerializer::getListener | ( | ) |
Returns the current listener.
void Ogre::MeshSerializer::importMesh | ( | DataStreamPtr & | stream, | |
Mesh * | pDest | |||
) |
Imports Mesh and (optionally) Material data from a .mesh file DataStream.
stream | The DataStream holding the .mesh data. Must be initialised (pos at the start of the buffer). | |
pDest | Pointer to the Mesh object which will receive the data. Should be blank already. |
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
void Ogre::Serializer::readBools | ( | DataStreamPtr & | stream, | |
bool * | pDest, | |||
size_t | count | |||
) | [protected, inherited] |
virtual unsigned short Ogre::Serializer::readChunk | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
virtual void Ogre::Serializer::readFileHeader | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
Reimplemented in Ogre::SkeletonSerializer.
void Ogre::Serializer::readFloats | ( | DataStreamPtr & | stream, | |
double * | pDest, | |||
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::readFloats | ( | DataStreamPtr & | stream, | |
float * | pDest, | |||
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::readInts | ( | DataStreamPtr & | stream, | |
uint32 * | pDest, | |||
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::readObject | ( | DataStreamPtr & | stream, | |
Quaternion & | pDest | |||
) | [protected, inherited] |
void Ogre::Serializer::readObject | ( | DataStreamPtr & | stream, | |
Vector3 & | pDest | |||
) | [protected, inherited] |
void Ogre::Serializer::readShorts | ( | DataStreamPtr & | stream, | |
uint16 * | pDest, | |||
size_t | count | |||
) | [protected, inherited] |
String Ogre::Serializer::readString | ( | DataStreamPtr & | stream, | |
size_t | numChars | |||
) | [protected, inherited] |
String Ogre::Serializer::readString | ( | DataStreamPtr & | stream | ) | [protected, inherited] |
void Ogre::MeshSerializer::setListener | ( | MeshSerializerListener * | listener | ) |
Sets the listener for this serializer.
void Ogre::Serializer::writeBools | ( | const bool *const | pLong, | |
size_t | count | |||
) | [protected, inherited] |
virtual void Ogre::Serializer::writeChunkHeader | ( | uint16 | id, | |
size_t | size | |||
) | [protected, virtual, inherited] |
void Ogre::Serializer::writeData | ( | const void *const | buf, | |
size_t | size, | |||
size_t | count | |||
) | [protected, inherited] |
virtual void Ogre::Serializer::writeFileHeader | ( | void | ) | [protected, virtual, inherited] |
void Ogre::Serializer::writeFloats | ( | const double *const | pfloat, | |
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::writeFloats | ( | const float *const | pfloat, | |
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::writeInts | ( | const uint32 *const | pInt, | |
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::writeObject | ( | const Quaternion & | q | ) | [protected, inherited] |
void Ogre::Serializer::writeObject | ( | const Vector3 & | vec | ) | [protected, inherited] |
void Ogre::Serializer::writeShorts | ( | const uint16 *const | pShort, | |
size_t | count | |||
) | [protected, inherited] |
void Ogre::Serializer::writeString | ( | const String & | string | ) | [protected, inherited] |
uint32 Ogre::Serializer::mCurrentstreamLen [protected, inherited] |
Definition at line 69 of file OgreSerializer.h.
bool Ogre::Serializer::mFlipEndian [protected, inherited] |
Definition at line 72 of file OgreSerializer.h.
MeshSerializerListener* Ogre::MeshSerializer::mListener [protected] |
Definition at line 181 of file OgreMeshSerializer.h.
DataStreamPtr Ogre::Serializer::mStream [protected, inherited] |
Definition at line 70 of file OgreSerializer.h.
String Ogre::Serializer::mVersion [protected, inherited] |
Definition at line 71 of file OgreSerializer.h.
Definition at line 179 of file OgreMeshSerializer.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:38:16 2012