OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Class for serialising mesh data to/from an OGRE .mesh file. More...
#include <OgreMeshSerializer.h>
Public Member Functions | |
MeshSerializer () | |
virtual | ~MeshSerializer () |
void | exportMesh (const Mesh *pMesh, const DataStreamPtr &stream, Endian endianMode=ENDIAN_NATIVE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | exportMesh (const Mesh *pMesh, const String &filename, Endian endianMode=ENDIAN_NATIVE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
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, MeshVersion version, Endian endianMode=ENDIAN_NATIVE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | exportMesh (const MeshPtr &pMesh, const String &filename, Endian endianMode=ENDIAN_NATIVE) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
MeshSerializerListener * | getListener () |
Returns the current listener. | |
void | importMesh (const 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. | |
Public Member Functions inherited from Ogre::Serializer | |
Serializer () | |
~Serializer () | |
Additional Inherited Members | |
Public Types inherited from Ogre::Serializer | |
enum | Endian { ENDIAN_NATIVE , ENDIAN_BIG , ENDIAN_LITTLE } |
The endianness of written files. More... | |
Class for serialising mesh data to/from an OGRE .mesh file.
This class allows exporters to write OGRE .mesh files easily, and allows the OGRE engine to import .mesh files into instantiated OGRE Meshes. Note that a .mesh file can include not only the Mesh, but also definitions of any Materials it uses (although this is optional, the .mesh can rely on the Material being loaded from another source, especially useful if you want to take advantage of OGRE's advanced Material properties which may not be available in your modeller).
Ogre::MeshSerializer::MeshSerializer | ( | ) |
|
virtual |
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.
This method takes an externally created Mesh object, and exports it to a .mesh file in the specified format version. Note that picking a format version other that the latest will cause some information to be lost.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MESH_VERSION_LATEST.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MESH_VERSION_LATEST.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::MESH_VERSION_LATEST.
void Ogre::MeshSerializer::exportMesh | ( | const Mesh * | pMesh, |
DataStreamPtr | stream, | ||
MeshVersion | version, | ||
Endian | endianMode = ENDIAN_NATIVE |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::MeshSerializer::importMesh | ( | const DataStreamPtr & | stream, |
Mesh * | pDest | ||
) |
Imports Mesh and (optionally) Material data from a .mesh file DataStream.
This method imports data from a DataStream opened from a .mesh file and places it's contents into the Mesh object which is passed in.
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::MeshSerializer::setListener | ( | MeshSerializerListener * | listener | ) |
Sets the listener for this serializer.
MeshSerializerListener * Ogre::MeshSerializer::getListener | ( | ) |
Returns the current listener.