Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIBoundsDeck Class Reference
Inheritance diagram for MOAIBoundsDeck:
MOAIDeck

List of all members.

Function List

  reserveBounds
  reserveIndices
  setBounds
  setIndex

Detailed Description

Deck of bounding boxes. Bounding boxes are allocated in a separate array from that used for box indices. The index array is used to map deck indices onto bounding boxes. In other words there may be more indices then boxes thus allowing for re-use of boxes over multiple indices.

The main purpose of the bounds deck is to override the default bounds of elements inside of another deck. The bounds deck may be attached to any other type of deck by using MOAIDeck's setBoundsDeck () method.


Function Documentation

Reserve an array of bounds to be indexed.


function reserveBounds ( MOAIBoundsDeck self, number nBounds )
Parameters:
self ( MOAIBoundsDeck )
nBounds ( number )
Returns:
nil

Reserve indices. Each index maps a deck item onto a bounding box.


function reserveIndices ( MOAIBoundsDeck self, number nIndices )
Parameters:
self ( MOAIBoundsDeck )
nIndices ( number )
Returns:
nil

Set the dimensions of a bounding box at a given index.


function setBounds ( MOAIBoundsDeck self, number idx, number xMin, number yMin, number zMin, number xMax, number yMax, number zMax )
Parameters:
self ( MOAIBoundsDeck )
idx ( number )
xMin ( number )
yMin ( number )
zMin ( number )
xMax ( number )
yMax ( number )
zMax ( number )
Returns:
nil

Associate a deck index with a bounding box.


function setIndex ( MOAIBoundsDeck self, number idx, number boundsID )
Parameters:
self ( MOAIBoundsDeck )
idx ( number )
boundsID ( number )
Returns:
nil