cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhysicsJoint Class Referenceabstract

#include <CCPhysicsJoint.h>

Inheritance diagram for PhysicsJoint:
PhysicsJointDistance PhysicsJointFixed PhysicsJointGear PhysicsJointGroove PhysicsJointLimit PhysicsJointMotor PhysicsJointPin PhysicsJointRatchet PhysicsJointRotaryLimit PhysicsJointRotarySpring PhysicsJointSpring

Public Member Functions

PhysicsBodygetBodyA () const
var getBodyA ()
local getBodyA ()
PhysicsBodygetBodyB () const
var getBodyB ()
local getBodyB ()
PhysicsWorldgetWorld () const
var getWorld ()
local getWorld ()
int getTag () const
var getTag ()
local getTag ()
void setTag (int tag)
local setTag ( local tag)
bool isEnabled () const
local isEnabled ()
void setEnable (bool enable)
 Enable/Disable the joint. More...
 
var setEnable ( var enable)
 Enable/Disable the joint. More...
 
local setEnable ( local enable)
 Enable/Disable the joint. More...
 
bool isCollisionEnabled () const
void setCollisionEnable (bool enable)
 Enable/disable the collision between two bodies. More...
 
var setCollisionEnable ( var enable)
 Enable/disable the collision between two bodies. More...
 
local setCollisionEnable ( local enable)
 Enable/disable the collision between two bodies. More...
 
void removeFormWorld ()
 Remove the joint from the world. More...
 
local removeFormWorld ()
 Remove the joint from the world. More...
 
void setMaxForce (float force)
 Set the max force between two bodies. More...
 
var setMaxForce ( var force)
 Set the max force between two bodies. More...
 
local setMaxForce ( local force)
 Set the max force between two bodies. More...
 
float getMaxForce () const
 Get the max force setting. More...
 

Protected Member Functions

 PhysicsJoint ()
 PhysicsJoint ()
virtual ~PhysicsJoint ()=0
local ~PhysicsJoint ()
bool init (PhysicsBody *a, PhysicsBody *b)
local init ( local a, local b)
bool initJoint ()
local initJoint ()
virtual bool createConstraints ()
local createConstraints ()

Protected Attributes

std::vector< cpConstraint * > _cpConstraints
var _cpConstraints
local _cpConstraints
PhysicsBody_bodyA
var _bodyA
local _bodyA
PhysicsBody_bodyB
var _bodyB
local _bodyB
PhysicsWorld_world
var _world
local _world
bool _enable
var _enable
local _enable
bool _collisionEnable
var _collisionEnable
local _collisionEnable
bool _destoryMark
var _destoryMark
local _destoryMark
int _tag
var _tag
local _tag
float _maxForce
var _maxForce
local _maxForce
bool _initDirty
var _initDirty
local _initDirty

Friends

class PhysicsBody
class PhysicsWorld
class PhysicsDebugDraw

Constructor & Destructor Documentation

PhysicsJoint ( )
protected
var PhysicsJoint ( )
protected
local PhysicsJoint ( )
protected
virtual ~PhysicsJoint ( )
protectedpure virtual
var ~PhysicsJoint ( )
protectedpure virtual
local ~PhysicsJoint ( )
protectedpure virtual

Member Function Documentation

PhysicsBody* getBodyA ( ) const
inline
var getBodyA ( )
inline
local getBodyA ( )
inline
PhysicsBody* getBodyB ( ) const
inline
var getBodyB ( )
inline
local getBodyB ( )
inline
float getMaxForce ( ) const
inline

Get the max force setting.

var getMaxForce ( )
inline

Get the max force setting.

local getMaxForce ( )
inline

Get the max force setting.

int getTag ( ) const
inline
var getTag ( )
inline
local getTag ( )
inline
PhysicsWorld* getWorld ( ) const
inline
var getWorld ( )
inline
local getWorld ( )
inline
bool init ( PhysicsBody a,
PhysicsBody b 
)
protected
var init ( var  a,
var  b 
)
protected
local init ( local  a,
local  b 
)
protected
bool initJoint ( )
protected
var initJoint ( )
protected
local initJoint ( )
protected
bool isCollisionEnabled ( ) const
inline
var isCollisionEnabled ( )
inline
local isCollisionEnabled ( )
inline
bool isEnabled ( ) const
inline
var isEnabled ( )
inline
local isEnabled ( )
inline
void removeFormWorld ( )

Remove the joint from the world.

var removeFormWorld ( )

Remove the joint from the world.

local removeFormWorld ( )

Remove the joint from the world.

void setCollisionEnable ( bool  enable)

Enable/disable the collision between two bodies.

var setCollisionEnable ( var  enable)

Enable/disable the collision between two bodies.

local setCollisionEnable ( local  enable)

Enable/disable the collision between two bodies.

void setEnable ( bool  enable)

Enable/Disable the joint.

var setEnable ( var  enable)

Enable/Disable the joint.

local setEnable ( local  enable)

Enable/Disable the joint.

void setMaxForce ( float  force)

Set the max force between two bodies.

var setMaxForce ( var  force)

Set the max force between two bodies.

local setMaxForce ( local  force)

Set the max force between two bodies.

void setTag ( int  tag)
inline
var setTag ( var  tag)
inline
local setTag ( local  tag)
inline

Friends And Related Function Documentation

friend class PhysicsBody
friend
var PhysicsBody
friend
local PhysicsBody
friend
friend class PhysicsDebugDraw
friend
var PhysicsDebugDraw
friend
local PhysicsDebugDraw
friend
friend class PhysicsWorld
friend
var PhysicsWorld
friend
local PhysicsWorld
friend

Member Data Documentation

PhysicsBody* _bodyA
protected
var _bodyA
protected
local _bodyA
protected
PhysicsBody* _bodyB
protected
var _bodyB
protected
local _bodyB
protected
bool _collisionEnable
protected
var _collisionEnable
protected
local _collisionEnable
protected
std::vector<cpConstraint*>
_cpConstraints
protected
var _cpConstraints
protected
local _cpConstraints
protected
bool _destoryMark
protected
var _destoryMark
protected
local _destoryMark
protected
bool _enable
protected
var _enable
protected
local _enable
protected
bool _initDirty
protected
var _initDirty
protected
local _initDirty
protected
float _maxForce
protected
var _maxForce
protected
local _maxForce
protected
int _tag
protected
var _tag
protected
local _tag
protected
PhysicsWorld* _world
protected
var _world
protected
local _world
protected

The documentation for this class was generated from the following file: