Packagecom.mousman.as3.agal.parser.verticeswriter
Classpublic class MVerticesBytesArrayWriterWT
InheritanceMVerticesBytesArrayWriterWT Inheritance Object
Implements IMBytesArrayWriter

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

This class is used for mesh with texture



Public Properties
 PropertyDefined By
  bytesArray : ByteArray
[read-only] A byteArray containing the datas for a vertexBuffer to be uploaded
MVerticesBytesArrayWriterWT
  computeNormalesOn : Boolean
[write-only] indicates if the normales have to be compute
MVerticesBytesArrayWriterWT
  indices : Vector.<uint>
[read-only] A Vector.<uint> containing the datas for a indexBuffer to be uploaded
MVerticesBytesArrayWriterWT
  nbVertices : int
[read-only] the number of vertices
MVerticesBytesArrayWriterWT
  verticesColor : int
[write-only] assign a color to the vertices
MVerticesBytesArrayWriterWT
Public Methods
 MethodDefined By
  
Constructor.
MVerticesBytesArrayWriterWT
  
addTriangle(indicesValues:Vector.<uint>, normalValues:Vector.<uint>, uvValues: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 ...
MVerticesBytesArrayWriterWT
  
complete():void
When all the vertices have been added , call this function to generate datas for a polygon group
MVerticesBytesArrayWriterWT
  
destroy():void
MVerticesBytesArrayWriterWT
  
get3PointNormal(p0:Vector3D, p1:Vector3D, p2:Vector3D):Vector3D
MVerticesBytesArrayWriterWT
  
init(vertices:Vector.<Number>, normals:Vector.<Number>, uvs:Vector.<Number> = null, ... args):void
Initalisation of MVerticesBytesArrayWriterWT the last argument is a variable argument, it is not used but is here just in case ...
MVerticesBytesArrayWriterWT
  
reset():void
Prepare for another polygone group to be made
MVerticesBytesArrayWriterWT
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
MVerticesBytesArrayWriterWT()Constructor
public function MVerticesBytesArrayWriterWT(writerParams:MBuffersWriterDTO = null)

Constructor. Creates a new MVerticesBytesArrayWriterWT 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>, uvValues: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 indices

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

A vector containing a triplet of normales indices

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

A vector containing uv for texture mapping

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

get3PointNormal()method 
public function get3PointNormal(p0:Vector3D, p1:Vector3D, p2:Vector3D):Vector3D

Parameters

p0:Vector3D
 
p1:Vector3D
 
p2:Vector3D

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

Initalisation of MVerticesBytesArrayWriterWT 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

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

A vector containing uv for texture mapping

 
... args

reset()method 
public function reset():void

Prepare for another polygone group to be made