Package | com.mousman.as3.agal.parser.objs |
Class | public class MObjParser |
Inheritance | MObjParser ![]() |
Implements | IDestroyable |
Property | Defined By | ||
---|---|---|---|
mesh : MObjMesh [read-only]
the object containing mesh datas
| MObjParser | ||
mirrorUV : Boolean [write-only]
some exporters mirror the UV texture coordinates
| MObjParser |
Method | Defined By | ||
---|---|---|---|
MObjParser(context:Context3D, scale:Number, shaderStore:ShaderStore, dataIsZxy:Boolean = false, mirrorUV:Boolean = true)
Constructor. | MObjParser | ||
destroy():void
delete datas
| MObjParser | ||
log(txt:String):void | MObjParser | ||
Parse the obj and mtl file and create the mesh datas
| MObjParser |
mesh | property |
mesh:MObjMesh
[read-only] the object containing mesh datas
public function get mesh():MObjMesh
mirrorUV | property |
mirrorUV:Boolean
[write-only] some exporters mirror the UV texture coordinates
The default value is true
.
public function set mirrorUV(value:Boolean):void
MObjParser | () | Constructor |
public function MObjParser(context:Context3D, scale:Number, shaderStore:ShaderStore, dataIsZxy:Boolean = false, mirrorUV:Boolean = true)
Constructor. Creates a new MObjParser instance.
After you create the MObjParser instance, call the parse method to create the mesh datas.
Parameterscontext:Context3D — : Context3D.Used to create and upload VertexBuffers and IndexBuffers | |
scale:Number — : Number.Used to resize the object | |
shaderStore:ShaderStore — : ShaderStore.Contains all the shaders used for the mesh | |
dataIsZxy:Boolean (default = false ) — : Boolean.Older versions of 3dsmax use an invalid vertex order | |
mirrorUV:Boolean (default = true ) — : Boolean.Some exporters mirror the UV texture coordinates |
destroy | () | method |
public function destroy():void
delete datas
log | () | method |
public function log(txt:String):void
Parameters
txt:String |
parse | () | method |
public function parse(objfile:String, mtlfile:String = null, writerParams:MBuffersWriterDTO = null):MObjMesh
Parse the obj and mtl file and create the mesh datas
Parameters
objfile:String — : String.Contains the obj file datas | |
mtlfile:String (default = null ) — : String.Contains the mtl file datas | |
writerParams:MBuffersWriterDTO (default = null ) — : MBuffersWriterDTOused to force color on the mesh. |
MObjMesh — the datas of the mesh
|