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

Function List

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

Additional Inherited Members

- 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
 

Detailed Description

Constants
MOAIParticleForce.FORCE
MOAIParticleForce.GRAVITY
MOAIParticleForce.OFFSET

Function Documentation

initAttractor

Greater force is exerted on particles as they approach attractor.


function initAttractor ( MOAIParticleForce self, number radius [, number magnitude ] )

Parameters
MOAIParticleForceself
numberradius Size of the attractor.
numbermagnitude Optional. Strength of the attractor.
Returns
nil
initBasin

Greater force is exerted on particles as they leave attractor.


function initBasin ( MOAIParticleForce self, number radius [, number magnitude ] )

Parameters
MOAIParticleForceself
numberradius Size of the attractor.
numbermagnitude Optional. Strength of the attractor.
Returns
nil
initLinear

A constant linear force will be applied to the particles.


function initLinear ( MOAIParticleForce self, number x [, number y ] )

Parameters
MOAIParticleForceself
numberx
numbery Optional.
Returns
nil
initRadial

A constant radial force will be applied to the particles.


function initRadial ( MOAIParticleForce self, number magnitude )

Parameters
MOAIParticleForceself
numbermagnitude
Returns
nil
setType

Set the type of force. FORCE will factor in the particle's mass. GRAVITY will ignore the particle's mass. OFFSET will ignore both mass and damping.


function setType ( MOAIParticleForce self, number type )

Parameters
MOAIParticleForceself
numbertype One of MOAIParticleForce.FORCE, MOAIParticleForce.GRAVITY, MOAIParticleForce.OFFSET
Returns
nil