Moai SDK  2.0
MOAIVertexBuffer Class Reference
+ Inheritance diagram for MOAIVertexBuffer:

Function List

computeBounds
 
countElements
 
printVertices
 
- Function List inherited from MOAIGfxResource
getAge
 
purge
 
setReloader
 
- Function List inherited from MOAIInstanceEventSource
getListener
 
setListener
 
- Function List inherited from MOAIStream
collapse
 
compact
 
flush
 
getCursor
 
getLength
 
read
 
read8
 
read16
 
read32
 
readBoolean
 
readDouble
 
readFloat
 
readFormat
 
readU8
 
readU16
 
readU32
 
seek
 
write
 
write8
 
write16
 
write32
 
writeBoolean
 
writeColor32
 
writeDouble
 
writeFloat
 
writeFormat
 
writeStream
 
writeU8
 
writeU16
 
writeU32
 

Additional Inherited Members

- Function List inherited from MOAIGfxBuffer
copyFromStream
 
release
 
reserve
 
reserveVBOs
 
scheduleFlush
 

Function Documentation

computeBounds

Calculates the buffer's axis-aligned bounding box. Returns nil if buffer is empty.


function computeBounds ( MOAIVertexBuffer self, MOAIVertexFormat format )

Parameters
MOAIVertexBufferself
MOAIVertexFormatformat
Returns
xMin, yMin, zMin, xMax, yMax, zMax
countElements

Get the number of vertices given either a vertex size or a vertex format.


function countElements ( MOAIVertexBuffer self, number vertexSize )

Parameters
MOAIVertexBufferself
numbervertexSize
Returns
number vertexCount
Note

function countElements ( MOAIVertexBuffer self, MOAIVertexFormat format )

Parameters
MOAIVertexBufferself
MOAIVertexFormatformat
Returns
number vertexCount
Note
printVertices

Print the vertices (for debugging purposes).


function printVertices ( MOAIVertexBuffer self, MOAIVertexFormat format )

Parameters
MOAIVertexBufferself
MOAIVertexFormatformat
Returns
nil