Moai SDK
1.5 revision 1 (MoaiEdition)
|
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 ( MOAIProp self )
self | ( MOAIProp ) |
Returns true if the given world space point falls inside the prop's bounds.
function inside ( MOAIProp self, number x, number y, number z [, number pad ] )
self | ( MOAIProp ) |
x | ( number ) |
y | ( number ) |
z | ( number ) |
pad | ( number ) Optional. Pad the hit bounds (in the prop's local space) |
Set the blend equation. This determines how the srcFactor and dstFactor values set with setBlendMode are interpreted.
function setBlendEquation ( MOAIProp self )
self | ( MOAIProp ) |
function setBlendEquation ( MOAIProp self, number equation )
self | ( MOAIProp ) |
equation | ( number ) One of GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT. |
Set the blend mode.
function setBlendMode ( MOAIProp self )
self | ( MOAIProp ) |
function setBlendMode ( MOAIProp self, number mode )
self | ( MOAIProp ) |
mode | ( number ) One of MOAIProp.BLEND_NORMAL, MOAIProp.BLEND_ADD, MOAIProp.BLEND_MULTIPLY. |
function setBlendMode ( MOAIProp self, number srcFactor, number dstFactor )
self | ( MOAIProp ) |
srcFactor | ( number ) |
dstFactor | ( number ) |
Sets or clears the partition bounds override.
function setBounds ( MOAIProp self )
self | ( MOAIProp ) |
function setBounds ( MOAIProp self, number xMin, number yMin, number zMin, number xMax, number yMax, number zMax )
self | ( MOAIProp ) |
xMin | ( number ) |
yMin | ( number ) |
zMin | ( number ) |
xMax | ( number ) |
yMax | ( number ) |
zMax | ( number ) |
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 ( MOAIProp self, boolean expandForSort )
self | ( MOAIProp ) |
expandForSort | ( boolean ) Default value is false. |
static setParent | |
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 ( MOAIProp self [, number priority ] )
self | ( MOAIProp ) |
priority | ( number ) Optional. Default value is nil. |
Set a remapper for this prop to use when drawing deck members.
function setRemapper ( MOAIProp self [, MOAIDeckRemapper remapper ] )
self | ( MOAIProp ) |
remapper | ( MOAIDeckRemapper ) Optional. Default value is nil. |
Set or clear the prop's scissor rect.
function setScissorRect ( MOAIProp self [, MOAIScissorRect scissorRect ] )
self | ( MOAIProp ) |
scissorRect | ( MOAIScissorRect ) Optional. Default value is nil. |
Sets or clears the prop's shader. The prop's shader takes precedence over any shader specified by the deck or its elements.
function setShader ( MOAIProp self [, MOAIShader shader ] )
self | ( MOAIProp ) |
shader | ( MOAIShader ) Optional. Default value is nil. |
Set or load a texture for this prop. The prop's texture will override the deck's texture.
function setTexture ( MOAIProp self, variant texture [, number transform ] )
self | ( MOAIProp ) |
texture | ( variant ) A MOAITexture, MOAIMultiTexture, MOAIDataBuffer or a path to a texture file |
transform | ( number ) Optional. Any bitwise combination of MOAITextureBase.QUANTIZE, MOAITextureBase.TRUECOLOR, MOAITextureBase.PREMULTIPLY_ALPHA |
Sets or clears the prop's UV transform.
function setUVTransform ( MOAIProp self [, MOAITransformBase transform ] )
self | ( MOAIProp ) |
transform | ( MOAITransformBase ) Optional. Default value is nil. |