A limit joint imposes a maximum distance between the two bodies, as if they were connected by a rope.
More...
#include <CCPhysicsJoint.h>
|
static PhysicsJointLimit * | construct (PhysicsBody *a, PhysicsBody *b, const Vec2 &anchr1, const Vec2 &anchr2) |
| Create a limit joint. More...
|
|
local | construct ( local a, local b, local anchr1, local anchr2) |
| Create a limit joint. More...
|
|
static PhysicsJointLimit * | construct (PhysicsBody *a, PhysicsBody *b, const Vec2 &anchr1, const Vec2 &anchr2, float min, float max) |
| Create a limit joint. More...
|
|
local | construct ( local a, local b, local anchr1, local anchr2, local min, local max) |
| Create a limit joint. More...
|
|
A limit joint imposes a maximum distance between the two bodies, as if they were connected by a rope.
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
- Returns
- A object pointer.
var construct |
( |
var |
a, |
|
|
var |
b, |
|
|
var |
anchr1, |
|
|
var |
anchr2 |
|
) |
| |
|
static |
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
- Returns
- A object pointer.
local construct |
( |
local |
a, |
|
|
local |
b, |
|
|
local |
anchr1, |
|
|
local |
anchr2 |
|
) |
| |
|
static |
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
- Returns
- A object pointer.
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
min | Define the allowed min distance of the anchor points. |
max | Define the allowed max distance of the anchor points. |
- Returns
- A object pointer.
var construct |
( |
var |
a, |
|
|
var |
b, |
|
|
var |
anchr1, |
|
|
var |
anchr2, |
|
|
var |
min, |
|
|
var |
max |
|
) |
| |
|
static |
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
min | Define the allowed min distance of the anchor points. |
max | Define the allowed max distance of the anchor points. |
- Returns
- A object pointer.
local construct |
( |
local |
a, |
|
|
local |
b, |
|
|
local |
anchr1, |
|
|
local |
anchr2, |
|
|
local |
min, |
|
|
local |
max |
|
) |
| |
|
static |
Create a limit joint.
- Parameters
-
a | A is the body to connect. |
b | B is the body to connect. |
anchr1 | Anchr1 is the anchor point on body a. |
anchr2 | Anchr2 is the anchor point on body b. |
min | Define the allowed min distance of the anchor points. |
max | Define the allowed max distance of the anchor points. |
- Returns
- A object pointer.
virtual bool createConstraints |
( |
| ) |
|
|
overridevirtual |
Create constraints for this type joint.
Reimplemented from PhysicsJoint.
var createConstraints |
( |
| ) |
|
|
overridevirtual |
Create constraints for this type joint.
Reimplemented from PhysicsJoint.
local createConstraints |
( |
| ) |
|
|
overridevirtual |
Create constraints for this type joint.
Reimplemented from PhysicsJoint.
Get the anchor point on body a.
Get the anchor point on body a.
Get the anchor point on body a.
Get the anchor point on body b.
Get the anchor point on body b.
Get the anchor point on body b.
Get the allowed max distance of the anchor points.
Get the allowed max distance of the anchor points.
Get the allowed max distance of the anchor points.
Get the allowed min distance of the anchor points.
Get the allowed min distance of the anchor points.
Get the allowed min distance of the anchor points.
void setAnchr1 |
( |
const Vec2 & |
anchr1 | ) |
|
Set the anchor point on body a.
var setAnchr1 |
( |
var |
anchr1 | ) |
|
Set the anchor point on body a.
local setAnchr1 |
( |
local |
anchr1 | ) |
|
Set the anchor point on body a.
void setAnchr2 |
( |
const Vec2 & |
anchr2 | ) |
|
Set the anchor point on body b.
var setAnchr2 |
( |
var |
anchr2 | ) |
|
Set the anchor point on body b.
local setAnchr2 |
( |
local |
anchr2 | ) |
|
Set the anchor point on body b.
Set the max distance of the anchor points.
Set the max distance of the anchor points.
local setMax |
( |
local |
max | ) |
|
Set the max distance of the anchor points.
Set the min distance of the anchor points.
Set the min distance of the anchor points.
local setMin |
( |
local |
min | ) |
|
Set the min distance of the anchor points.
The documentation for this class was generated from the following file: