cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhysicsJointRotarySpring Class Reference

Likes a spring joint, but works with rotary. More...

#include <CCPhysicsJoint.h>

Inheritance diagram for PhysicsJointRotarySpring:
PhysicsJoint

Public Member Functions

float getRestAngle () const
local getRestAngle ()
void setRestAngle (float restAngle)
local setRestAngle ( local restAngle)
float getStiffness () const
local getStiffness ()
void setStiffness (float stiffness)
float getDamping () const
local getDamping ()
void setDamping (float damping)
local setDamping ( local damping)
- Public Member Functions inherited from PhysicsJoint
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...
 
float getMaxForce () const
 Get the max force setting. More...
 
local getMaxForce ()
 Get the max force setting. More...
 

Static Public Member Functions

static PhysicsJointRotarySpringconstruct (PhysicsBody *a, PhysicsBody *b, float stiffness, float damping)
local construct ( local a, local b, local stiffness, local damping)
- Static Public Member Functions inherited from PhysicsJoint
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

bool init (PhysicsBody *a, PhysicsBody *b, float stiffness, float damping)
 PhysicsJointRotarySpring ()
 PhysicsJointRotarySpring ()
virtual ~PhysicsJointRotarySpring ()
local ~PhysicsJointRotarySpring ()
- Protected Member Functions inherited from 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

Additional Inherited Members

- Protected Attributes inherited from PhysicsJoint
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

Detailed Description

Likes a spring joint, but works with rotary.

Constructor & Destructor Documentation

PhysicsJointRotarySpring ( )
inlineprotected
local PhysicsJointRotarySpring ( )
inlineprotected
virtual ~PhysicsJointRotarySpring ( )
inlineprotectedvirtual
local ~PhysicsJointRotarySpring ( )
inlineprotectedvirtual

Member Function Documentation

static
PhysicsJointRotarySpring*
construct
( PhysicsBody a,
PhysicsBody b,
float  stiffness,
float  damping 
)
static
local construct ( local  a,
local  b,
local  stiffness,
local  damping 
)
static
float getDamping ( ) const
local getDamping ( )
float getRestAngle ( ) const
local getRestAngle ( )
float getStiffness ( ) const
local getStiffness ( )
bool init ( PhysicsBody a,
PhysicsBody b,
float  stiffness,
float  damping 
)
protected
local init ( local  a,
local  b,
local  stiffness,
local  damping 
)
protected
void setDamping ( float  damping)
local setDamping ( local  damping)
void setRestAngle ( float  restAngle)
local setRestAngle ( local  restAngle)
void setStiffness ( float  stiffness)
local setStiffness ( local  stiffness)

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