Packagecom.mousman.as3.agal.parser.objs
Classpublic class MCompactObjImportParser
InheritanceMCompactObjImportParser Inheritance Object
Implements IDestroyable

import a mdm compact binary file and create a set of vertex buffers and index buffers



Public Properties
 PropertyDefined By
  mesh : MObjMesh
[read-only] the object containing mesh datas
MCompactObjImportParser
Public Methods
 MethodDefined By
  
MCompactObjImportParser(context:Context3D, scale:Number, shaderStore:ShaderStore)
Constructor.
MCompactObjImportParser
  
destroy():void
delete datas
MCompactObjImportParser
  
parse(meshData:ByteArrayAsset, writerParams:MBuffersWriterDTO = null):MObjMesh
Parse the obj and mtl file and create the mesh datas
MCompactObjImportParser
Property Detail
meshproperty
mesh:MObjMesh  [read-only]

the object containing mesh datas


Implementation
    public function get mesh():MObjMesh
Constructor Detail
MCompactObjImportParser()Constructor
public function MCompactObjImportParser(context:Context3D, scale:Number, shaderStore:ShaderStore)

Constructor. Creates a new MObjParser instance.

After you create the MObjParser instance, call the parse method to create the mesh datas.

Parameters
context:Context3D — : Context3D.

Used to create and upload VertexBuffers and IndexBuffers

 
scale:Number — : ShaderStore.

Contains all the shaders used for the mesh

 
shaderStore:ShaderStore
Method Detail
destroy()method
public function destroy():void

delete datas

parse()method 
public function parse(meshData:ByteArrayAsset, writerParams:MBuffersWriterDTO = null):MObjMesh

Parse the obj and mtl file and create the mesh datas

Parameters

meshData:ByteArrayAsset — : ByteArrayAsset.

Contains the obj and mtl datas in a binary format

 
writerParams:MBuffersWriterDTO (default = null) — : MBuffersWriterDTO

used to force color on the mesh.

Returns
MObjMesh — the datas of the mesh