cocos2d-x  3.2
 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
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...
 
float getMaxForce () const
 Get the max force setting. More...
 
local getMaxForce ()
 Get the max force setting. More...
 

Static Public Member Functions

static void destroy (PhysicsJoint *joint)
 Distory the joint. More...
 
var destroy ( var joint)
 Distory the joint. More...
 
local destroy ( local joint)
 Distory the joint. More...
 

Protected Member Functions

 PhysicsJoint ()
 PhysicsJoint ()
 PhysicsJoint ()
virtual ~PhysicsJoint ()=0
local ~PhysicsJoint ()
bool init (PhysicsBody *a, PhysicsBody *b)
local init ( local a, local b)
PhysicsBodyInfogetBodyInfo (PhysicsBody *body) const
 PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
 
var getBodyInfo ( var body)
 PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
 
NodegetBodyNode (PhysicsBody *body) const

Protected Attributes

PhysicsBody_bodyA
PhysicsBody_bodyB
var _bodyB
local _bodyB
PhysicsWorld_world
var _world
local _world
PhysicsJointInfo_info
var _info
local _info
bool _enable
var _enable
local _enable
bool _collisionEnable
var _collisionEnable
local _collisionEnable
bool _destoryMark
var _destoryMark
local _destoryMark
int _tag
var _tag
local _tag

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

static void destroy ( PhysicsJoint joint)
static

Distory the joint.

var destroy ( var  joint)
static

Distory the joint.

local destroy ( local  joint)
static

Distory the joint.

PhysicsBody* getBodyA ( ) const
inline
var getBodyA ( )
inline
local getBodyA ( )
inline
PhysicsBody* getBodyB ( ) const
inline
var getBodyB ( )
inline
local getBodyB ( )
inline
PhysicsBodyInfo* getBodyInfo ( PhysicsBody body) const
protected

PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't.

so this method is use for subclasses to catch the bodyInfo from PhysicsBody.

var getBodyInfo ( var  body)
protected

PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't.

so this method is use for subclasses to catch the bodyInfo from PhysicsBody.

local getBodyInfo ( local  body)
protected

PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't.

so this method is use for subclasses to catch the bodyInfo from PhysicsBody.

Node* getBodyNode ( PhysicsBody body) const
protected
var getBodyNode ( var  body)
protected
local getBodyNode ( local  body)
protected
float getMaxForce ( ) const

Get the max force setting.

var getMaxForce ( )

Get the max force setting.

local getMaxForce ( )

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 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
bool _destoryMark
protected
var _destoryMark
protected
local _destoryMark
protected
bool _enable
protected
var _enable
protected
local _enable
protected
PhysicsJointInfo* _info
protected
var _info
protected
local _info
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: