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

Function List

getBounds
 
getDims
 
getPartition
 
getPriority
 
getWorldBounds
 
inside
 
setBounds
 
setExpandForSort
 
setHitGranularity
 
setPriority
 
- Function List inherited from MOAITransform
addLoc
 
addPiv
 
addRot
 
addScl
 
getLoc
 
getPiv
 
getRot
 
getScl
 
move
 
moveLoc
 
movePiv
 
moveRot
 
moveScl
 
seek
 
seekLoc
 
seekPiv
 
seekRot
 
seekScl
 
setLoc
 
setPiv
 
setRot
 
setScl
 
setShearByX
 
setShearByY
 
setShearByZ
 
- Function List inherited from MOAITransformBase
getWorldDir
 
getWorldLoc
 
getWorldRot
 
getWorldScl
 
getWorldXAxis
 
getWorldYAxis
 
getWorldZAxis
 
getWorldXNormal
 
getWorldYNormal
 
getWorldZNormal
 
modelToWorld
 
setParent
 
worldToModel
 

Additional Inherited Members

- Function List inherited from MOAINode
clearAttrLink
 
clearNodeLink
 
forceUpdate
 
getAttr
 
getAttrLink
 
getNodeState
 
moveAttr
 
scheduleUpdate
 
seekAttr
 
setAttrLink
 
setAttr
 
setNodeLink
 
- Function List inherited from MOAIInstanceEventSource
getListener
 
setListener
 

Detailed Description

Attributes
MOAIPartitionHull.ATTR_INDEX
MOAIPartitionHull.ATTR_PARTITION

Function Documentation

getBounds

Return the prop's local bounds or 'nil' if prop bounds is global or missing. The bounds are in model space and will be overridden by the prop's bounds if it's been set (using setBounds ())


function getBounds ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
number xMin, number yMin, number zMin, number xMax, number yMax, number zMax
getDims

Return the prop's width and height or 'nil' if prop rect is global.


function getDims ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
number width, number height, number depth
getPartition

Returns the partition prop is currently held in.


function getPartition ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
MOAIPartition partition
getPriority

Returns the current priority of the node or 'nil' if the priority is uninitialized.


function getPriority ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
number priority
getWorldBounds

Return the prop's world bounds or 'nil' if prop bounds is global or missing.


function getWorldBounds ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
number xMin, number yMin, number zMin, number xMax, number yMax, number zMax
inside

Returns true if the given world space point falls inside the prop's bounds.


function insid ( MOAIPartitionHull self, number x, number y, number z [, number pad ] )

Parameters
MOAIPartitionHullself
numberx
numbery
numberz
numberpad Optional. Pad the hit bounds (in the prop's local space)
Returns
boolean isInside
setBounds

Sets or clears the partition bounds override.


function setBounds ( MOAIPartitionHull self )

Parameters
MOAIPartitionHullself
Returns
nil
Note
Clear the bounds override.

function setBounds ( MOAIPartitionHull self, number xMin, number yMin, number zMin, number xMax, number yMax, number zMax )

Parameters
MOAIPartitionHullself
numberxMin
numberyMin
numberzMin
numberxMax
numberyMax
numberzMax
Returns
nil
Note
Set the bounds override.
setExpandForSort

Used when drawing with a layout scheme (i.e. MOAIGrid). Expanding for sort causes the prop to emit a sub-prim for each component of the layout. For example, when attaching a MOAIGrid to a prop, each cell of the grid will be added to the render queue for sorting against all other props and sub-prims. This is obviously less efficient, but still more efficient then using an separate prop for each cell or object.


function setExpandForSort ( MOAIPartitionHull self, boolean expandForSort )

Parameters
MOAIPartitionHullself
booleanexpandForSort Default value is false.
Returns
nil
setHitGranularity

Specify the granularity to use when performing a hit test. This is a hint to the implementation as to how much processing to allocate to a given test. The default value is MOAIPartitionHull.HIT_TEST_COARSE, which will cause only the deck or prop bounds to be used. A setting of MOAIPartitionHull.HIT_TEST_MEDIUM or MOAIPartitionHull.HIT_TEST_FINE is implementation dependent on the deck, but 'medium' usually means to test against the geometry of the deck and 'fine' means to test against both the geometry and the pixels of the hit mask (if any).


function setHitGranularity ( MOAIPartitionHull self [, int granularity ] )

Parameters
MOAIPartitionHullself
intgranularity Optional. One of MOAIPartitionHull.HIT_TEST_COARSE, MOAIPartitionHull.HIT_TEST_MEDIUM, MOAIPartitionHull.HIT_TEST_FINE. Default is MOAIPartitionHull.HIT_TEST_COARSE.
Returns
nil
setPriority

Sets or clears the node's priority. Clear the priority to have MOAIPartition automatically assign a priority to a node when it is added.


function setPriority ( MOAIPartitionHull self [, number priority ] )

Parameters
MOAIPartitionHullself
numberpriority Optional. Default value is nil.
Returns
nil