Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAIBox2DPrim.
Function List | |
destroy | |
getBody | |
getFilter | |
setCollisionHandler | |
setDensity | |
setFilter | |
setFriction | |
setRestitution | |
setSensor |
Schedule fixture for destruction.
function destroy ( MOAIBox2DFixture self )
self | ( MOAIBox2DFixture ) |
Returns the body that owns the fixture.
function getBody ( MOAIBox2DFixture self )
self | ( MOAIBox2DFixture ) |
See Box2D documentation.
function getFilter ( MOAIBox2DFixture self )
self | ( MOAIBox2DFixture ) |
Sets a Lua function to call when collisions occur. The handler should accept the following parameters: ( phase, fixtureA, fixtureB, arbiter ). 'phase' will be one of the phase masks. 'fixtureA' will be the fixture receiving the collision. 'fixtureB' will be the other fixture in the collision. 'arbiter' will be the MOAIArbiter. Note that the arbiter is only good for the current collision: do not keep references to it for later use.
function setCollisionHandler ( MOAIBox2DFixture self, function handler [, number phaseMask, number categoryMask ] )
self | ( MOAIBox2DFixture ) |
handler | ( function ) |
phaseMask | ( number ) Optional. Any bitwise combination of MOAIBox2DArbiter.BEGIN, MOAIBox2DArbiter.END, MOAIBox2DArbiter.POST_SOLVE, MOAIBox2DArbiter.PRE_SOLVE, MOAIBox2DArbiter.ALL |
categoryMask | ( number ) Optional. Check against opposing fixture's category bits and generate collision events if match. |
See Box2D documentation.
function setDensity ( MOAIBox2DFixture self, number density )
self | ( MOAIBox2DFixture ) |
density | ( number ) In kg/units^2, converted to kg/m^2 |
See Box2D documentation.
function setFilter ( MOAIBox2DFixture self, number categoryBits [, number maskBits, number groupIndex ] )
self | ( MOAIBox2DFixture ) |
categoryBits | ( number ) |
maskBits | ( number ) Optional. |
groupIndex | ( number ) Optional. |
See Box2D documentation.
function setFriction ( MOAIBox2DFixture self, number friction )
self | ( MOAIBox2DFixture ) |
friction | ( number ) |
See Box2D documentation.
function setRestitution ( MOAIBox2DFixture self, number restitution )
self | ( MOAIBox2DFixture ) |
restitution | ( number ) |
See Box2D documentation.
function setSensor ( MOAIBox2DFixture self [, boolean isSensor ] )
self | ( MOAIBox2DFixture ) |
isSensor | ( boolean ) Optional. Default value is 'true' |