public

Inheritance Graph

graph BT
	StreamerMMF
	StreamerMMF --> AbstractRenderingStreamer
	click StreamerMMF "classRendering_1_1Serialization_1_1StreamerMMF"
	click AbstractRenderingStreamer "classRendering_1_1Serialization_1_1AbstractRenderingStreamer"

Description

.mmf ( MinSG Mesh Format)

Fileformat: binary little endian

MMF-File ::= Header (char[4] “mmf”+chr(13) ), uint32 version (currently 0x01), DataBlock * (one VertexBlock and one IndexBlock), EndMarker (uint32 0xFFFFFFFF)

DataBlock ::= uint32 dataType, uint32 dataSizenr of bytes to be jumped to skip the block (not including dataType and blockSize value), uint8 data[dataSize]

DataBlock ::= VertexBlock

DataBlock ::= IndexBlock

VertexBlock ::= Vertex-dataType (uint32 0x00), uint32 dataSize, VertexAttributeDescription , EndMarker (uint32 0xFFFFFFFF), uint32 vertexCountthe number of vertices in the following datablock, uint8 vertexDatathe vertex data

VertexAttributeDescription ::= uint32 attrIdone of the constants: 0x00:POSITION (attribute name: “sg_Position”) 0x01:NORMAL (attribute name: “sg_Normal”) 0x02:COLOR (attribute name: “sg_Color”) 0x06:TEX0 (attribute name: “sg_TexCoord0”) 0x07:TEX1 (attribute name: “sg_TexCoord1”) 0xff:custom attribute MMF_CUSTOM_ATTR_ID uint32 numValuesentrysize of the vertexattribute specified by index, uint32 (=GLuint) typetype of the vertexattribute specified by index, uint32 extLengthlength of the extension for future use, VertexAttributeExtension* (extensions for the vertex attribute)

VertexAttributeExtension ::= uint32 extension Type uint32 dataLength uint8 data[dataLength]

VertexAttributeExtension ::= VertexAttributeNameExtension

VertexAttributeNameExtension ::= uint32 extension Type 0x03 ( MMF_VERTEX_ATTR_EXT_NAME ) uint32 length of name string including padding zeros uint8* attrName (filled up with additional zeros until 32bit alignment is reached.

IndexBlock ::= Index-dataType (uint32 0x01), uint32 dataSize, uint32 indexCountthe number of indices in the following datablock, uint32 (=GLuint) indexModethe meaning of the indices (GL_TRIANGLES, GL_TRIANGLE_STRIP, …), uint8* indexDatathe index data

Classes

   
struct Rendering::Serialization::StreamerMMF::Reader

Public Static Attributes

   
   
const uint32_t MMF_VERSION
   
const uint32_t MMF_HEADER
   
const uint32_t MMF_VERTEX_DATA
   
const uint32_t MMF_INDEX_DATA
   
const uint32_t MMF_END
   
const uint32_t MMF_CUSTOM_ATTR_ID
   
const uint32_t MMF_VERTEX_ATTR_EXT_NAME
   
const char *const fileExtension

Public Functions

   
   
  StreamerMMF()
   
  ~StreamerMMF()
   
Util::GenericAttributeList * loadGeneric(std::istream & void)
   
Mesh * loadMesh(std::istream & void)
   
bool saveMesh( Mesh * void, std::ostream & void)

Public Static Functions

   
   
uint8_t queryCapabilities(const std::string & extension)

Documentation

variable
Rendering::Serialization::StreamerMMF::MMF_VERSION

public static
 
 
const uint32_t MMF_VERSION

Defined in Rendering/Serialization/StreamerMMF.h:82


variable
Rendering::Serialization::StreamerMMF::MMF_HEADER

public static
 
 
const uint32_t MMF_HEADER

Defined in Rendering/Serialization/StreamerMMF.h:83


variable
Rendering::Serialization::StreamerMMF::MMF_VERTEX_DATA

public static
 
 
const uint32_t MMF_VERTEX_DATA

Defined in Rendering/Serialization/StreamerMMF.h:85


variable
Rendering::Serialization::StreamerMMF::MMF_INDEX_DATA

public static
 
 
const uint32_t MMF_INDEX_DATA

Defined in Rendering/Serialization/StreamerMMF.h:86


variable
Rendering::Serialization::StreamerMMF::MMF_END

public static
 
 
const uint32_t MMF_END

Defined in Rendering/Serialization/StreamerMMF.h:87


variable
Rendering::Serialization::StreamerMMF::MMF_CUSTOM_ATTR_ID

public static
 
 
const uint32_t MMF_CUSTOM_ATTR_ID

Defined in Rendering/Serialization/StreamerMMF.h:89


variable
Rendering::Serialization::StreamerMMF::MMF_VERTEX_ATTR_EXT_NAME

public static
 
 
const uint32_t MMF_VERTEX_ATTR_EXT_NAME

Defined in Rendering/Serialization/StreamerMMF.h:90


variable
Rendering::Serialization::StreamerMMF::fileExtension

public static
 
 
const char *const fileExtension

Defined in Rendering/Serialization/StreamerMMF.h:103


function
Rendering::Serialization::StreamerMMF::StreamerMMF

public inline
   
   
StreamerMMF( )

Defined in Rendering/Serialization/StreamerMMF.h:92


function
Rendering::Serialization::StreamerMMF::~StreamerMMF

public inline virtual
   
   
~StreamerMMF( )

Defined in Rendering/Serialization/StreamerMMF.h:95


function
Rendering::Serialization::StreamerMMF::loadGeneric

public virtual
     
     
Util::GenericAttributeList * loadGeneric( std::istream & void )

Load generic data from the given stream.

Parameters

input
Use the data from the stream beginning at the preset position.

Returns

Description list containing the generic data. The caller is responsible for the memory deallocation.

Defined in Rendering/Serialization/StreamerMMF.h:98


function
Rendering::Serialization::StreamerMMF::loadMesh

public virtual
     
     
Mesh * loadMesh( std::istream & void )

Load a mesh from the given stream.

Parameters

input
Use the data from the stream beginning at the preset position.

Returns

Mesh object. The caller is responsible for the memory deallocation.

Defined in Rendering/Serialization/StreamerMMF.h:99


function
Rendering::Serialization::StreamerMMF::saveMesh

public virtual
     
     
bool saveMesh( Mesh * void,
  std::ostream & void
)    

Save a mesh to the given stream.

Parameters

mesh
Mesh object to save.
output
Use the stream for writing beginning at the preset position.

Returns

trueif successful,falseotherwise.

Defined in Rendering/Serialization/StreamerMMF.h:100


function
Rendering::Serialization::StreamerMMF::queryCapabilities

public static
     
     
uint8_t queryCapabilities( const std::string & extension )

Defined in Rendering/Serialization/StreamerMMF.h:102