|
virtual PhysicsShape * | addShape (PhysicsShape *shape, bool addMassAndMoment=true) |
| Add a shape to body. More...
|
|
void | removeShape (PhysicsShape *shape, bool reduceMassAndMoment=true) |
| Remove a shape from body. More...
|
|
var | removeShape ( var shape, var true) |
| Remove a shape from body. More...
|
|
local | removeShape ( local shape, local true) |
| Remove a shape from body. More...
|
|
void | removeShape (int tag, bool reduceMassAndMoment=true) |
| Remove a shape from body. More...
|
|
var | removeShape ( var tag, var true) |
| Remove a shape from body. More...
|
|
local | removeShape ( local tag, local true) |
| Remove a shape from body. More...
|
|
void | removeAllShapes (bool reduceMassAndMoment=true) |
| Remove all shapes. More...
|
|
var | removeAllShapes ( var true) |
| Remove all shapes. More...
|
|
local | removeAllShapes ( local true) |
| Remove all shapes. More...
|
|
const Vector< PhysicsShape * > & | getShapes () const |
| Get the body shapes. More...
|
|
local | getShapes () |
| Get the body shapes. More...
|
|
PhysicsShape * | getFirstShape () const |
| Get the first shape of the body shapes. More...
|
|
var | getFirstShape () |
| Get the first shape of the body shapes. More...
|
|
local | getFirstShape () |
| Get the first shape of the body shapes. More...
|
|
PhysicsShape * | getShape (int tag) const |
| get the shape of the body. More...
|
|
local | getShape ( local tag) |
| get the shape of the body. More...
|
|
virtual void | applyForce (const Vec2 &force, const Vec2 &offset=Vec2::ZERO) |
| Applies a continuous force to body. More...
|
|
var | applyForce ( var force, var ZERO) |
| Applies a continuous force to body. More...
|
|
local | applyForce ( local force, local ZERO) |
| Applies a continuous force to body. More...
|
|
virtual void | resetForces () |
| reset all the force applied to body.
|
|
virtual void | applyImpulse (const Vec2 &impulse, const Vec2 &offset=Vec2::ZERO) |
| Applies a immediate force to body. More...
|
|
var | applyImpulse ( var impulse, var ZERO) |
| Applies a immediate force to body. More...
|
|
local | applyImpulse ( local impulse, local ZERO) |
| Applies a immediate force to body. More...
|
|
virtual void | applyTorque (float torque) |
| Applies a torque force to body. More...
|
|
local | applyTorque ( local torque) |
| Applies a torque force to body. More...
|
|
virtual void | setVelocity (const Vec2 &velocity) |
| Set the velocity of a body. More...
|
|
local | setVelocity ( local velocity) |
| Set the velocity of a body. More...
|
|
virtual Vec2 | getVelocity () |
| Get the velocity of a body. More...
|
|
var | getVelocity () |
| Get the velocity of a body. More...
|
|
local | getVelocity () |
| Get the velocity of a body. More...
|
|
virtual void | setAngularVelocity (float velocity) |
| Set the angular velocity of a body. More...
|
|
virtual Vec2 | getVelocityAtLocalPoint (const Vec2 &point) |
| Get the angular velocity of a body at a local point. More...
|
|
var | getVelocityAtLocalPoint ( var point) |
| Get the angular velocity of a body at a local point. More...
|
|
local | getVelocityAtLocalPoint ( local point) |
| Get the angular velocity of a body at a local point. More...
|
|
virtual Vec2 | getVelocityAtWorldPoint (const Vec2 &point) |
| get the angular velocity of a body at a world point
|
|
virtual float | getAngularVelocity () |
| get the angular velocity of a body
|
|
virtual void | setVelocityLimit (float limit) |
| set the max of velocity
|
|
local | setVelocityLimit ( local limit) |
| set the max of velocity
|
|
virtual float | getVelocityLimit () |
| get the max of velocity
|
|
var | getVelocityLimit () |
| get the max of velocity
|
|
local | getVelocityLimit () |
| get the max of velocity
|
|
virtual void | setAngularVelocityLimit (float limit) |
| set the max of angular velocity
|
|
virtual float | getAngularVelocityLimit () |
| get the max of angular velocity
|
|
void | removeFromWorld () |
| remove the body from the world it added to
|
|
var | removeFromWorld () |
| remove the body from the world it added to
|
|
local | removeFromWorld () |
| remove the body from the world it added to
|
|
PhysicsWorld * | getWorld () const |
| get the world body added to. More...
|
|
local | getWorld () |
| get the world body added to. More...
|
|
const std::vector
< PhysicsJoint * > & | getJoints () const |
| get all joints the body have
|
|
local | getJoints () |
| get all joints the body have
|
|
Node * | getNode () const |
| get the node the body set to. More...
|
|
void | setCategoryBitmask (int bitmask) |
| A mask that defines which categories this physics body belongs to. More...
|
|
void | setContactTestBitmask (int bitmask) |
| A mask that defines which categories of bodies cause intersection notifications with this physics body. More...
|
|
void | setCollisionBitmask (int bitmask) |
| A mask that defines which categories of physics bodies can collide with this physics body. More...
|
|
int | getCategoryBitmask () const |
| Return bitmask of first shape. More...
|
|
var | getCategoryBitmask () |
| Return bitmask of first shape. More...
|
|
local | getCategoryBitmask () |
| Return bitmask of first shape. More...
|
|
int | getContactTestBitmask () const |
| Return bitmask of first shape. More...
|
|
int | getCollisionBitmask () const |
| Return bitmask of first shape. More...
|
|
var | getCollisionBitmask () |
| Return bitmask of first shape. More...
|
|
local | getCollisionBitmask () |
| Return bitmask of first shape. More...
|
|
void | setGroup (int group) |
| Set the group of body. More...
|
|
int | getGroup () const |
| Return group of first shape. More...
|
|
Vec2 | getPosition () const |
| get the body position. More...
|
|
var | getPosition () |
| get the body position. More...
|
|
local | getPosition () |
| get the body position. More...
|
|
float | getRotation () |
| get the body rotation. More...
|
|
var | getRotation () |
| get the body rotation. More...
|
|
local | getRotation () |
| get the body rotation. More...
|
|
void | setPositionOffset (const Vec2 &position) |
| set body position offset, it's the position witch relative to node
|
|
var | setPositionOffset ( var position) |
| set body position offset, it's the position witch relative to node
|
|
local | setPositionOffset ( local position) |
| set body position offset, it's the position witch relative to node
|
|
const Vec2 & | getPositionOffset () const |
| get body position offset. More...
|
|
var | getPositionOffset () |
| get body position offset. More...
|
|
local | getPositionOffset () |
| get body position offset. More...
|
|
void | setRotationOffset (float rotation) |
| set body rotation offset, it's the rotation witch relative to node
|
|
float | getRotationOffset () const |
| set the body rotation offset
|
|
var | getRotationOffset () |
| set the body rotation offset
|
|
bool | isDynamic () const |
| Test the body is dynamic or not. More...
|
|
var | isDynamic () |
| Test the body is dynamic or not. More...
|
|
local | isDynamic () |
| Test the body is dynamic or not. More...
|
|
void | setDynamic (bool dynamic) |
| Set dynamic to body. More...
|
|
void | setMass (float mass) |
| Set the body mass. More...
|
|
var | setMass ( var mass) |
| Set the body mass. More...
|
|
local | setMass ( local mass) |
| Set the body mass. More...
|
|
float | getMass () const |
| Get the body mass. More...
|
|
var | getMass () |
| Get the body mass. More...
|
|
local | getMass () |
| Get the body mass. More...
|
|
void | addMass (float mass) |
| Add mass to body. More...
|
|
local | addMass ( local mass) |
| Add mass to body. More...
|
|
void | setMoment (float moment) |
| Set the body moment of inertia. More...
|
|
var | setMoment ( var moment) |
| Set the body moment of inertia. More...
|
|
local | setMoment ( local moment) |
| Set the body moment of inertia. More...
|
|
float | getMoment () const |
| Get the body moment of inertia. More...
|
|
var | getMoment () |
| Get the body moment of inertia. More...
|
|
local | getMoment () |
| Get the body moment of inertia. More...
|
|
void | addMoment (float moment) |
| Add moment of inertia to body. More...
|
|
local | addMoment ( local moment) |
| Add moment of inertia to body. More...
|
|
float | getLinearDamping () const |
| get linear damping. More...
|
|
var | getLinearDamping () |
| get linear damping. More...
|
|
local | getLinearDamping () |
| get linear damping. More...
|
|
void | setLinearDamping (float damping) |
| Set linear damping. More...
|
|
float | getAngularDamping () const |
| Get angular damping. More...
|
|
void | setAngularDamping (float damping) |
| Set angular damping. More...
|
|
bool | isResting () const |
| Whether the body is at rest. More...
|
|
void | setResting (bool rest) const |
| set body to rest
|
|
var | setResting ( var rest) |
| set body to rest
|
|
local | setResting ( local rest) |
| set body to rest
|
|
virtual void | setEnabled (bool enable) override |
| Set the enable value. More...
|
|
local | setEnabled ( local enable) |
| Set the enable value. More...
|
|
bool | isRotationEnabled () const |
| Whether the body can rotation. More...
|
|
void | setRotationEnable (bool enable) |
| Set the body is allow rotation or not.
|
|
var | setRotationEnable ( var enable) |
| Set the body is allow rotation or not.
|
|
local | setRotationEnable ( local enable) |
| Set the body is allow rotation or not.
|
|
bool | isGravityEnabled () const |
| Whether this physics body is affected by the physics world's gravitational force. More...
|
|
void | setGravityEnable (bool enable) |
| Set the body is affected by the physics world's gravitational force or not. More...
|
|
var | setGravityEnable ( var enable) |
| Set the body is affected by the physics world's gravitational force or not. More...
|
|
local | setGravityEnable ( local enable) |
| Set the body is affected by the physics world's gravitational force or not. More...
|
|
int | getTag () const |
| Get the body's tag. More...
|
|
void | setTag (int tag) |
| set the body's tag. More...
|
|
var | setTag ( var tag) |
| set the body's tag. More...
|
|
local | setTag ( local tag) |
| set the body's tag. More...
|
|
Vec2 | world2Local (const Vec2 &point) |
| Convert the world point to local. More...
|
|
var | world2Local ( var point) |
| Convert the world point to local. More...
|
|
local | world2Local ( local point) |
| Convert the world point to local. More...
|
|
Vec2 | local2World (const Vec2 &point) |
| Convert the local point to world. More...
|
|
var | local2World ( var point) |
| Convert the local point to world. More...
|
|
local | local2World ( local point) |
| Convert the local point to world. More...
|
|
cpBody * | getCPBody () const |
| Get the rigid body of chipmunk. More...
|
|
var | getCPBody () |
| Get the rigid body of chipmunk. More...
|
|
local | getCPBody () |
| Get the rigid body of chipmunk. More...
|
|