Packagecom.mousman.as3.agal.parser.verticeswriter
Classpublic class MVerticesBytesArrayWriter
InheritanceMVerticesBytesArrayWriter Inheritance flash.events.EventDispatcher
Implements IMBytesArrayWriter

MVerticesBytesArrayWriter has in charge to build the vertices byteArray buffer and the indices buffer

This class is used for mesh without texture



Public Properties
 PropertyDefined By
  bytesArray : ByteArray
[read-only] A byteArray containing the datas for a vertexBuffer to be uploaded
MVerticesBytesArrayWriter
  computeNormalesOn : Boolean
[write-only] indicates if the normales have to be compute
MVerticesBytesArrayWriter
  indices : Vector.<uint>
[read-only] A Vector.<uint> containing the datas for a indexBuffer to be uploaded
MVerticesBytesArrayWriter
  nbVertices : int
[read-only] the number of vertices
MVerticesBytesArrayWriter
  verticesColor : int
[write-only] assign a color to the vertices
MVerticesBytesArrayWriter
Public Methods
 MethodDefined By
  
Constructor.
MVerticesBytesArrayWriter
  
addTriangle(indicesValues:Vector.<uint>, normalValues:Vector.<uint>, notUsed:Vector.<uint> = null):void
add a trangle for the construction of buffer3D and Index3D the last argument is a variable argument, it is not used but is here just in case ...
MVerticesBytesArrayWriter
  
complete():void
When all the vertices have been added , call this function to generate datas for a polygon group
MVerticesBytesArrayWriter
  
destroy():void
MVerticesBytesArrayWriter
  
init(vertices:Vector.<Number>, normals:Vector.<Number>, notUsed:Vector.<Number> = null, ... args):void
Initalisation of MVerticesBytesArrayWriter the last argument is a variable argument, it is not used but is here just in case ...
MVerticesBytesArrayWriter
  
reset():void
Prepare for another polygone group to be made
MVerticesBytesArrayWriter
Property Detail
bytesArrayproperty
bytesArray:ByteArray  [read-only]

A byteArray containing the datas for a vertexBuffer to be uploaded


Implementation
    public function get bytesArray():ByteArray
computeNormalesOnproperty 
computeNormalesOn:Boolean  [write-only]

indicates if the normales have to be compute


Implementation
    public function set computeNormalesOn(value:Boolean):void
indicesproperty 
indices:Vector.<uint>  [read-only]

A Vector.<uint> containing the datas for a indexBuffer to be uploaded


Implementation
    public function get indices():Vector.<uint>
nbVerticesproperty 
nbVertices:int  [read-only]

the number of vertices


Implementation
    public function get nbVertices():int
verticesColorproperty 
verticesColor:int  [write-only]

assign a color to the vertices


Implementation
    public function set verticesColor(value:int):void
Constructor Detail
MVerticesBytesArrayWriter()Constructor
public function MVerticesBytesArrayWriter(writerParams:MBuffersWriterDTO = null)

Constructor. Creates a new MVerticesBytesArrayWriter instance.

Parameters
writerParams:MBuffersWriterDTO (default = null) — : MBuffersWriterDTO.

Used to force color in the mesh creation

Method Detail
addTriangle()method
public function addTriangle(indicesValues:Vector.<uint>, normalValues:Vector.<uint>, notUsed:Vector.<uint> = null):void

add a trangle for the construction of buffer3D and Index3D the last argument is a variable argument, it is not used but is here just in case ...

Parameters

indicesValues:Vector.<uint> — : Vector.<uint>.

A vector containing a triplet of vertices

 
normalValues:Vector.<uint> — : Vector.<Number>.

A vector containing a triplet of normales

 
notUsed:Vector.<uint> (default = null) — : Vector.

<Number>Not used , only here to match the Interface IMBytesArrayWriter

complete()method 
public function complete():void

When all the vertices have been added , call this function to generate datas for a polygon group

destroy()method 
public function destroy():void

init()method 
public function init(vertices:Vector.<Number>, normals:Vector.<Number>, notUsed:Vector.<Number> = null, ... args):void

Initalisation of MVerticesBytesArrayWriter the last argument is a variable argument, it is not used but is here just in case ...

Parameters

vertices:Vector.<Number> — : Vector.<Number>.

A vector containing vertices

 
normals:Vector.<Number> — : Vector.<Number>.

A vector containing normales

 
notUsed:Vector.<Number> (default = null) — : Vector.<Number>.

Not used , only here to match the Interface

 
... args

reset()method 
public function reset():void

Prepare for another polygone group to be made