An PhysicsWorld object simulates collisions and other physical properties.
More...
#include <CCPhysicsWorld.h>
|
| virtual void | addJoint (PhysicsJoint *joint) |
| | Adds a joint to the physics world. More...
|
| |
| local | addJoint ( local joint) |
| | Adds a joint to the physics world. More...
|
| |
| virtual void | removeJoint (PhysicsJoint *joint, bool destroy) |
| | Removes a joint from the physics world. More...
|
| |
| virtual void | removeAllJoints (bool destroy) |
| | Remove all joints from the physics world. More...
|
| |
| virtual void | removeBody (PhysicsBody *body) |
| var | removeBody ( var body) |
| local | removeBody ( local body) |
| virtual void | removeBody (int tag) |
| var | removeBody ( var tag) |
| local | removeBody ( local tag) |
| virtual void | removeAllBodies () |
| void | rayCast (PhysicsRayCastCallbackFunc func, const Point &point1, const Point &point2, void *data) |
| var | rayCast ( var func, var point1, var point2, var data) |
| local | rayCast ( local func, local point1, local point2, local data) |
| void | queryRect (PhysicsRectQueryCallbackFunc func, const Rect &rect, void *data) |
| void | queryPoint (PhysicsPointQueryCallbackFunc func, const Point &point, void *data) |
| local | queryPoint ( local func, local point, local data) |
| Array * | getShapes (const Point &point) const |
| PhysicsShape * | getShape (const Point &point) const |
| local | getShape ( local point) |
| Array * | getAllBodies () const |
| PhysicsBody * | getBody (int tag) const |
| local | getBody ( local tag) |
| Scene & | getScene () const |
| | Register a listener to receive contact callbacks. More...
|
| |
| Vect | getGravity () const |
| | get the gravity value More...
|
| |
| local | getGravity () |
| | get the gravity value More...
|
| |
| void | setGravity (const Vect &gravity) |
| | set the gravity value More...
|
| |
| local | setGravity ( local gravity) |
| | set the gravity value More...
|
| |
| void | setDebugDrawMask (int mask) |
| | set the debug draw More...
|
| |
| var | setDebugDrawMask ( var mask) |
| | set the debug draw More...
|
| |
| local | setDebugDrawMask ( local mask) |
| | set the debug draw More...
|
| |
| int | getDebugDrawMask () |
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 addBody |
( |
local |
body) | |
|
|
protectedvirtual |
| var addBodyOrDelay |
( |
var |
body) | |
|
|
protectedvirtual |
| local addBodyOrDelay |
( |
local |
body) | |
|
|
protectedvirtual |
Adds a joint to the physics world.
| var addJoint |
( |
var |
joint) | |
|
|
virtual |
Adds a joint to the physics world.
| local addJoint |
( |
local |
joint) | |
|
|
virtual |
Adds a joint to the physics world.
| var addJointOrDelay |
( |
var |
joint) | |
|
|
protectedvirtual |
| local addJointOrDelay |
( |
local |
joint) | |
|
|
protectedvirtual |
| var addShape |
( |
var |
shape) | |
|
|
protectedvirtual |
| local addShape |
( |
local |
shape) | |
|
|
protectedvirtual |
| var collisionBeginCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
| local collisionBeginCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
| var collisionPostSolveCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
| local collisionPostSolveCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
| var collisionPreSolveCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
| local collisionPreSolveCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
| var collisionSeparateCallback |
( |
var |
contact) | |
|
|
protectedvirtual |
| local collisionSeparateCallback |
( |
local |
contact) | |
|
|
protectedvirtual |
| var construct |
( |
var |
scene) | |
|
|
staticprotected |
| local construct |
( |
local |
scene) | |
|
|
staticprotected |
| virtual void debugDraw |
( |
) | |
|
|
protectedvirtual |
| var doAddBody |
( |
var |
body) | |
|
|
protectedvirtual |
| local doAddBody |
( |
local |
body) | |
|
|
protectedvirtual |
| var doAddJoint |
( |
var |
joint) | |
|
|
protectedvirtual |
| local doAddJoint |
( |
local |
joint) | |
|
|
protectedvirtual |
| var doRemoveBody |
( |
var |
body) | |
|
|
protectedvirtual |
| local doRemoveBody |
( |
local |
body) | |
|
|
protectedvirtual |
| var doRemoveJoint |
( |
var |
joint) | |
|
|
protectedvirtual |
| local doRemoveJoint |
( |
local |
joint) | |
|
|
protectedvirtual |
| Array* getAllBodies |
( |
) | |
const |
| local getBody |
( |
local |
tag) | |
|
| local getDebugDrawMask |
( |
) | |
|
|
inline |
| Vect getGravity |
( |
) | |
const |
|
inline |
| Scene& getScene |
( |
) | |
const |
|
inline |
Register a listener to receive contact callbacks.
Unregister a listener.
Register a listener to receive contact callbacks.
Unregister a listener.
Register a listener to receive contact callbacks.
Unregister a listener.
| var getShape |
( |
var |
point) | |
|
| local getShape |
( |
local |
point) | |
|
| var getShapes |
( |
var |
point) | |
|
| local getShapes |
( |
local |
point) | |
|
| bool init |
( |
Scene & |
scene) | |
|
|
protected |
| local init |
( |
local |
scene) | |
|
|
protected |
| var queryPoint |
( |
var |
func, |
|
|
var |
point, |
|
|
var |
data |
|
) |
| |
| local queryPoint |
( |
local |
func, |
|
|
local |
point, |
|
|
local |
data |
|
) |
| |
| var queryRect |
( |
var |
func, |
|
|
var |
rect, |
|
|
var |
data |
|
) |
| |
| local queryRect |
( |
local |
func, |
|
|
local |
rect, |
|
|
local |
data |
|
) |
| |
| var rayCast |
( |
var |
func, |
|
|
var |
point1, |
|
|
var |
point2, |
|
|
var |
data |
|
) |
| |
| local rayCast |
( |
local |
func, |
|
|
local |
point1, |
|
|
local |
point2, |
|
|
local |
data |
|
) |
| |
| virtual void removeAllBodies |
( |
) | |
|
|
virtual |
| local removeAllBodies |
( |
) | |
|
|
virtual |
| virtual void removeAllJoints |
( |
bool |
destroy) | |
|
|
virtual |
Remove all joints from the physics world.
| var removeAllJoints |
( |
var |
destroy) | |
|
|
virtual |
Remove all joints from the physics world.
| local removeAllJoints |
( |
local |
destroy) | |
|
|
virtual |
Remove all joints from the physics world.
| var removeBody |
( |
var |
body) | |
|
|
virtual |
| local removeBody |
( |
local |
body) | |
|
|
virtual |
| virtual void removeBody |
( |
int |
tag) | |
|
|
virtual |
| var removeBody |
( |
var |
tag) | |
|
|
virtual |
| local removeBody |
( |
local |
tag) | |
|
|
virtual |
| var removeBodyOrDelay |
( |
var |
body) | |
|
|
protectedvirtual |
| local removeBodyOrDelay |
( |
local |
body) | |
|
|
protectedvirtual |
| virtual void removeJoint |
( |
PhysicsJoint * |
joint, |
|
|
bool |
destroy |
|
) |
| |
|
virtual |
Removes a joint from the physics world.
| var removeJoint |
( |
var |
joint, |
|
|
var |
destroy |
|
) |
| |
|
virtual |
Removes a joint from the physics world.
| local removeJoint |
( |
local |
joint, |
|
|
local |
destroy |
|
) |
| |
|
virtual |
Removes a joint from the physics world.
| var removeJointOrDelay |
( |
var |
joint) | |
|
|
protectedvirtual |
| local removeJointOrDelay |
( |
local |
joint) | |
|
|
protectedvirtual |
| var removeShape |
( |
var |
shape) | |
|
|
protectedvirtual |
| local removeShape |
( |
local |
shape) | |
|
|
protectedvirtual |
| void setDebugDrawMask |
( |
int |
mask) | |
|
| var setDebugDrawMask |
( |
var |
mask) | |
|
| local setDebugDrawMask |
( |
local |
mask) | |
|
| void setGravity |
( |
const Vect & |
gravity) | |
|
| var setGravity |
( |
var |
gravity) | |
|
| local setGravity |
( |
local |
gravity) | |
|
| virtual void update |
( |
float |
delta) | |
|
|
protectedvirtual |
| local update |
( |
local |
delta) | |
|
|
protectedvirtual |
| virtual void updateBodies |
( |
) | |
|
|
protectedvirtual |
| virtual void updateJoints |
( |
) | |
|
|
protectedvirtual |
| friend class PhysicsWorldCallback |
|
friend |
| local PhysicsWorldCallback |
|
friend |
| Array* _delayRemoveBodies |
|
protected |
| const long DEBUGDRAW_CONTACT = 0x04 |
|
static |
| var DEBUGDRAW_CONTACT = 0x04 |
|
static |
| local DEBUGDRAW_CONTACT = 0x04 |
|
static |
| const long DEBUGDRAW_JOINT = 0x02 |
|
static |
| var DEBUGDRAW_JOINT = 0x02 |
|
static |
| local DEBUGDRAW_JOINT = 0x02 |
|
static |
| const long DEBUGDRAW_NONE = 0x00 |
|
static |
| var DEBUGDRAW_NONE = 0x00 |
|
static |
| local DEBUGDRAW_NONE = 0x00 |
|
static |
| const long DEBUGDRAW_SHAPE = 0x01 |
|
static |
| var DEBUGDRAW_SHAPE = 0x01 |
|
static |
| local DEBUGDRAW_SHAPE = 0x01 |
|
static |
The documentation for this class was generated from the following file: