Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIProp Class Reference
Inheritance diagram for MOAIProp:
MOAITransform MOAIColor MOAIRenderable MOAITransform MOAIColor MOAIRenderable MOAITransformBase MOAINode MOAITransformBase MOAINode MOAINode MOAIInstanceEventSource MOAINode MOAIInstanceEventSource MOAIInstanceEventSource MOAIEventSource MOAIInstanceEventSource MOAIEventSource MOAIEventSource MOAIEventSource MOAILayer MOAIParticleSystem MOAITextBox

List of all members.

Function List

  getBounds
  getDims
  getGrid
  getIndex
  getPriority
  getWorldBounds
  isVisible
  inside
  setBillboard
  setBlendEquation
  setBlendMode
  setBounds
  setCullMode
  setDeck
  setDepthMask
  setDepthTest
  setExpandForSort
  setGrid
  setGridScale
  setIndex
  setParent
  setPriority
  setRemapper
  setScissorRect
  setShader
  setTexture
  setUVTransform
  setVisible
  setParent

Function Documentation

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 )
Parameters:
self ( MOAIProp )
Returns:
xMin ( number ), yMin ( number ), zMin ( number ), xMax ( number ), yMax ( number ), zMax ( number )

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


function getDims ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
width ( number ), height ( number ), depth ( number )

Get the grid currently connected to the prop.


function getGrid ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
grid ( MOAIGrid )

Gets the value of the deck indexer.


function getIndex ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
index ( number )

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


function getPriority ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
priority ( number )

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


function getWorldBounds ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
xMin ( number ), yMin ( number ), zMin ( number ), xMax ( number ), yMax ( number ), zMax ( number )

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 ] )
Parameters:
self ( MOAIProp )
x ( number )
y ( number )
z ( number )
pad ( number ) Optional. Pad the hit bounds (in the prop's local space)
Returns:
isInside ( boolean )

Returns true if the given prop is visible.


function isVisible ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
isVisible ( boolean )

If set, prop will face camera when rendering.


function setBillboard ( MOAIProp self [, boolean billboard ] )
Parameters:
self ( MOAIProp )
billboard ( boolean ) Optional. Default value is false.
Returns:
nil

Set the blend equation. This determines how the srcFactor and dstFactor values set with setBlendMode are interpreted.


function setBlendEquation ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
nil
Note:
Reset the blend function to GL_FUNC_ADD.

function setBlendEquation ( MOAIProp self, number equation )
Parameters:
self ( MOAIProp )
equation ( number ) One of GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT.
Returns:
nil
Note:
Set the blend equation.

Set the blend mode.


function setBlendMode ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
nil
Note:
Reset the blend mode to MOAIProp.BLEND_NORMAL (equivalent to src = GL_ONE, dst = GL_ONE_MINUS_SRC_ALPHA). This will reset the blend function to GL_FUNC_ADD.

function setBlendMode ( MOAIProp self, number mode )
Parameters:
self ( MOAIProp )
mode ( number ) One of MOAIProp.BLEND_NORMAL, MOAIProp.BLEND_ADD, MOAIProp.BLEND_MULTIPLY.
Returns:
nil
Note:
Set blend mode using one of the Moai presets. This will reset the blend function to GL_FUNC_ADD.

function setBlendMode ( MOAIProp self, number srcFactor, number dstFactor )
Parameters:
self ( MOAIProp )
srcFactor ( number )
dstFactor ( number )
Returns:
nil
Note:
Set blend mode using OpenGL source and dest factors. OpenGl blend factor constants are exposed as members of MOAIProp. See the OpenGL documentation for an explanation of blending constants.

Sets or clears the partition bounds override.


function setBounds ( MOAIProp self )
Parameters:
self ( MOAIProp )
Returns:
nil
Note:
Clear the bounds override.

function setBounds ( MOAIProp self, number xMin, number yMin, number zMin, number xMax, number yMax, number zMax )
Parameters:
self ( MOAIProp )
xMin ( number )
yMin ( number )
zMin ( number )
xMax ( number )
yMax ( number )
zMax ( number )
Returns:
nil
Note:
Set the bounds override.

Sets and enables face culling.


function setCullMode ( MOAIProp self [, number cullMode ] )
Parameters:
self ( MOAIProp )
cullMode ( number ) Optional. Default value is MOAIProp.CULL_NONE.
Returns:
nil

Sets or clears the deck to be indexed by the prop.


function setDeck ( MOAIProp self [, MOAIDeck deck ] )
Parameters:
self ( MOAIProp )
deck ( MOAIDeck ) Optional. Default value is nil.
Returns:
nil

Disables or enables depth writing.


function setDepthMask ( MOAIProp self [, boolean depthMask ] )
Parameters:
self ( MOAIProp )
depthMask ( boolean ) Optional. Default value is true.
Returns:
nil

Sets and enables depth testing (assuming depth buffer is present).


function setDepthTest ( MOAIProp self [, number depthFunc ] )
Parameters:
self ( MOAIProp )
depthFunc ( number ) Optional. Default value is MOAIProp.DEPTH_TEST_DISABLE.
Returns:
nil

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 )
Parameters:
self ( MOAIProp )
expandForSort ( boolean ) Default value is false.
Returns:
nil

Sets or clears the prop's grid indexer. The grid indexer (if any) will override the standard indexer.


function setGrid ( MOAIProp self [, MOAIGrid grid ] )
Parameters:
self ( MOAIProp )
grid ( MOAIGrid ) Optional. Default value is nil.
Returns:
nil

Scale applied to deck items before rendering to grid cell.


function setGridScale ( MOAIProp self [, number xScale, number yScale ] )
Parameters:
self ( MOAIProp )
xScale ( number ) Optional. Default value is 1.
yScale ( number ) Optional. Default value is 1.
Returns:
nil

Set the prop's index into its deck.


function setIndex ( MOAIProp self [, number index ] )
Parameters:
self ( MOAIProp )
index ( number ) Optional. Default value is 1.
Returns:
nil
static setParent

This method has been deprecated. Use MOAINode setAttrLink instead.


function setParent ( MOAIColor self [, MOAINode parent ] )
Parameters:
self ( MOAIColor )
parent ( MOAINode ) Optional. Default value is nil.
Returns:
nil

Reimplemented from MOAIColor.

This method has been deprecated. Use MOAINode setAttrLink instead.


function setParent ( MOAIProp self [, MOAINode parent ] )
Parameters:
self ( MOAIProp )
parent ( MOAINode ) Optional. Default value is nil.
Returns:
nil

Reimplemented from MOAIColor.

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 ] )
Parameters:
self ( MOAIProp )
priority ( number ) Optional. Default value is nil.
Returns:
nil

Set a remapper for this prop to use when drawing deck members.


function setRemapper ( MOAIProp self [, MOAIDeckRemapper remapper ] )
Parameters:
self ( MOAIProp )
remapper ( MOAIDeckRemapper ) Optional. Default value is nil.
Returns:
nil

Set or clear the prop's scissor rect.


function setScissorRect ( MOAIProp self [, MOAIScissorRect scissorRect ] )
Parameters:
self ( MOAIProp )
scissorRect ( MOAIScissorRect ) Optional. Default value is nil.
Returns:
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 ] )
Parameters:
self ( MOAIProp )
shader ( MOAIShader ) Optional. Default value is nil.
Returns:
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 ] )
Parameters:
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
Returns:
texture ( MOAIGfxState )

Sets or clears the prop's UV transform.


function setUVTransform ( MOAIProp self [, MOAITransformBase transform ] )
Parameters:
self ( MOAIProp )
transform ( MOAITransformBase ) Optional. Default value is nil.
Returns:
nil

Sets or clears the prop's visibility.


function setVisible ( MOAIProp self [, boolean visible ] )
Parameters:
self ( MOAIProp )
visible ( boolean ) Optional. Default value is true.
Returns:
nil