An PhysicsWorld object simulates collisions and other physical properties.
More...
#include <CCPhysicsWorld.h>
|
static PhysicsWorld * | create () |
static int | collisionBeginCallbackFunc (cpArbiter *arb, struct cpSpace *space, void *data) |
var | collisionBeginCallbackFunc ( var arb, var space, var data) |
local | collisionBeginCallbackFunc ( local arb, local space, local data) |
static int | collisionPreSolveCallbackFunc (cpArbiter *arb, cpSpace *space, void *data) |
static void | collisionPostSolveCallbackFunc (cpArbiter *arb, cpSpace *space, void *data) |
var | collisionPostSolveCallbackFunc ( var arb, var space, var data) |
local | collisionPostSolveCallbackFunc ( local arb, local space, local data) |
static void | collisionSeparateCallbackFunc (cpArbiter *arb, cpSpace *space, void *data) |
An PhysicsWorld object simulates collisions and other physical properties.
You do not create PhysicsWorld objects directly; instead, you can get it from an Scene object.
local addChild |
( |
local |
body) | |
|
|
protectedvirtual |
Adds a joint to the physics world.
var addJoint |
( |
var |
joint) | |
|
Adds a joint to the physics world.
local addJoint |
( |
local |
joint) | |
|
Adds a joint to the physics world.
var addShape |
( |
var |
shape) | |
|
|
protectedvirtual |
local addShape |
( |
local |
shape) | |
|
|
protectedvirtual |
var collisionBeginCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
local collisionBeginCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
static int
collisionBeginCallbackFunc |
( |
cpArbiter * |
arb, |
|
|
struct cpSpace * |
space, |
|
|
void * |
data |
|
) |
| |
|
staticprotected |
var collisionBeginCallbackFunc |
( |
var |
arb, |
|
|
var |
space, |
|
|
var |
data |
|
) |
| |
|
staticprotected |
local collisionBeginCallbackFunc |
( |
local |
arb, |
|
|
local |
space, |
|
|
local |
data |
|
) |
| |
|
staticprotected |
var collisionPostSolveCallback |
( |
var |
contact, |
|
|
var |
solve |
|
) |
| |
|
protectedvirtual |
local collisionPostSolveCallback |
( |
local |
contact, |
|
|
local |
solve |
|
) |
| |
|
protectedvirtual |
static void
collisionPostSolveCallbackFunc |
( |
cpArbiter * |
arb, |
|
|
cpSpace * |
space, |
|
|
void * |
data |
|
) |
| |
|
staticprotected |
var collisionPostSolveCallbackFunc |
( |
var |
arb, |
|
|
var |
space, |
|
|
var |
data |
|
) |
| |
|
staticprotected |
local
collisionPostSolveCallbackFunc |
( |
local |
arb, |
|
|
local |
space, |
|
|
local |
data |
|
) |
| |
|
staticprotected |
var collisionPreSolveCallback |
( |
var |
contact, |
|
|
var |
solve |
|
) |
| |
|
protectedvirtual |
local collisionPreSolveCallback |
( |
local |
contact, |
|
|
local |
solve |
|
) |
| |
|
protectedvirtual |
static int
collisionPreSolveCallbackFunc |
( |
cpArbiter * |
arb, |
|
|
cpSpace * |
space, |
|
|
void * |
data |
|
) |
| |
|
staticprotected |
var collisionPreSolveCallbackFunc |
( |
var |
arb, |
|
|
var |
space, |
|
|
var |
data |
|
) |
| |
|
staticprotected |
local collisionPreSolveCallbackFunc |
( |
local |
arb, |
|
|
local |
space, |
|
|
local |
data |
|
) |
| |
|
staticprotected |
virtual void
collisionSeparateCallback |
( |
const PhysicsContact & |
contact) | |
|
|
protectedvirtual |
var collisionSeparateCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
local collisionSeparateCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
static void
collisionSeparateCallbackFunc |
( |
cpArbiter * |
arb, |
|
|
cpSpace * |
space, |
|
|
void * |
data |
|
) |
| |
|
staticprotected |
var collisionSeparateCallbackFunc |
( |
var |
arb, |
|
|
var |
space, |
|
|
var |
data |
|
) |
| |
|
staticprotected |
local collisionSeparateCallbackFunc |
( |
local |
arb, |
|
|
local |
space, |
|
|
local |
data |
|
) |
| |
|
staticprotected |
virtual void debugDraw |
( |
) | |
|
|
protectedvirtual |
var drawWithShape |
( |
var |
node, |
|
|
var |
shape |
|
) |
| |
|
protectedvirtual |
local drawWithShape |
( |
local |
node, |
|
|
local |
shape |
|
) |
| |
|
protectedvirtual |
Array* getAllBody |
( |
) | |
const |
var getBodysAlongRay |
( |
var |
start, |
|
|
var |
end |
|
) |
| |
local getBodysAlongRay |
( |
local |
start, |
|
|
local |
end |
|
) |
| |
var getBodysAtPoint |
( |
var |
point) | |
|
local getBodysAtPoint |
( |
local |
point) | |
|
var getBodysInRect |
( |
var |
rect) | |
|
local getBodysInRect |
( |
local |
rect) | |
|
test the debug draw is enabled
test the debug draw is enabled
test the debug draw is enabled
Register a listener to receive contact callbacks.
var registerContactListener |
( |
var |
delegate) | |
|
|
inline |
Register a listener to receive contact callbacks.
local registerContactListener |
( |
local |
delegate) | |
|
|
inline |
Register a listener to receive contact callbacks.
Remove all joints from the physics world.
Remove all joints from the physics world.
local removeAllJoints |
( |
) | |
|
Remove all joints from the physics world.
Removes a joint from the physics world.
var removeJoint |
( |
var |
joint) | |
|
Removes a joint from the physics world.
local removeJoint |
( |
local |
joint) | |
|
Removes a joint from the physics world.
void setDebugDraw |
( |
bool |
debugDraw) | |
|
|
inline |
var setDebugDraw |
( |
var |
debugDraw) | |
|
|
inline |
local setDebugDraw |
( |
local |
debugDraw) | |
|
|
inline |
void setGravity |
( |
Point |
gravity) | |
|
var setGravity |
( |
var |
gravity) | |
|
local setGravity |
( |
local |
gravity) | |
|
void setScene |
( |
Scene * |
scene) | |
|
|
protected |
var setScene |
( |
var |
scene) | |
|
|
protected |
local setScene |
( |
local |
scene) | |
|
|
protected |
void unregisterContactListener |
( |
) | |
|
|
inline |
var unregisterContactListener |
( |
) | |
|
|
inline |
local unregisterContactListener |
( |
) | |
|
|
inline |
virtual void update |
( |
float |
delta) | |
|
|
protectedvirtual |
local update |
( |
local |
delta) | |
|
|
protectedvirtual |
The documentation for this class was generated from the following file: