C# Class Axiom.Serialization.MeshSerializer

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 instatiated OGRE Meshes.

It's important to realize 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.

Inheritance: Serializer
Show file Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
ExportMesh ( Axiom.Core.Mesh mesh, string fileName ) : void

Exports a mesh to the file specified.

GetDependencyInfo ( Stream stream, Axiom.Core.Mesh mesh ) : DependencyInfo
ImportMesh ( Stream stream, Axiom.Core.Mesh mesh ) : void

Imports mesh data from a .mesh file.

MeshSerializer ( ) : System

Default constructor.

Method Details

ExportMesh() public method

Exports a mesh to the file specified.
public ExportMesh ( Axiom.Core.Mesh mesh, string fileName ) : void
mesh Axiom.Core.Mesh Reference to the mesh to export.
fileName string The destination filename.
return void

GetDependencyInfo() public method

public GetDependencyInfo ( Stream stream, Axiom.Core.Mesh mesh ) : DependencyInfo
stream Stream
mesh Axiom.Core.Mesh
return DependencyInfo

ImportMesh() public method

Imports mesh data from a .mesh file.
public ImportMesh ( Stream stream, Axiom.Core.Mesh mesh ) : void
stream Stream The stream holding the .mesh data. Must be initialised (pos at the start of the buffer).
mesh Axiom.Core.Mesh Reference to the Mesh object which will receive the data. Should be blank already.
return void

MeshSerializer() public method

Default constructor.
public MeshSerializer ( ) : System
return System