Class for serialising mesh data to/from an OGRE .mesh file.
More...
#include <OgreMeshSerializer.h>
|
| 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. More...
|
|
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. More...
|
|
void | exportMesh (const Mesh *pMesh, DataStreamPtr stream, Endian endianMode=ENDIAN_NATIVE) |
| Exports a mesh to the stream specified, in the latest format. More...
|
|
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. More...
|
|
MeshSerializerListener * | getListener () |
| Returns the current listener. More...
|
|
void | importMesh (const DataStreamPtr &stream, Mesh *pDest) |
| Imports Mesh and (optionally) Material data from a .mesh file DataStream. More...
|
|
void | setListener (MeshSerializerListener *listener) |
| Sets the listener for this serializer. More...
|
|
| Serializer () |
|
| ~Serializer () |
|
Class for serialising mesh data to/from an OGRE .mesh file.
- To export a Mesh:
-
Use the MaterialManager methods to create any dependent Material objects, if you want to export them with the Mesh.
-
Create a Mesh object and populate it using it's methods.
-
Call the exportMesh method
- It's important to realise that this exporter uses OGRE terminology. In this context, 'Mesh' means a top-level mesh structure which can actually contain many SubMeshes, each of which has only one Material. Modelling packages may refer to these differently, for example in Milkshape, it says 'Model' instead of 'Mesh' and 'Mesh' instead of 'SubMesh', but the theory is the same.
◆ MeshSerializer()
Ogre::MeshSerializer::MeshSerializer |
( |
| ) |
|
◆ ~MeshSerializer()
virtual Ogre::MeshSerializer::~MeshSerializer |
( |
| ) |
|
|
virtual |
◆ exportMesh() [1/4]
Exports a mesh to the file specified, in the latest format.
- Parameters
-
pMesh | Pointer to the Mesh to export |
filename | The destination filename |
endianMode | The endian mode of the written file |
◆ exportMesh() [2/4]
Exports a mesh to the file specified, in a specific version format.
- Parameters
-
pMesh | Pointer to the Mesh to export |
filename | The destination filename |
version | Mesh version to write |
endianMode | The endian mode of the written file |
◆ exportMesh() [3/4]
Exports a mesh to the stream specified, in the latest format.
- Parameters
-
pMesh | Pointer to the Mesh to export |
stream | Writeable stream |
endianMode | The endian mode of the written file |
◆ exportMesh() [4/4]
Exports a mesh to the stream specified, in a specific version format.
- Parameters
-
pMesh | Pointer to the Mesh to export |
stream | Writeable stream |
version | Mesh version to write |
endianMode | The endian mode of the written file |
◆ importMesh()
Imports Mesh and (optionally) Material data from a .mesh file DataStream.
- Parameters
-
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. |
◆ setListener()
Sets the listener for this serializer.
◆ getListener()
Returns the current listener.
The documentation for this class was generated from the following file: