A polygon shape.
More...
#include <CCPhysicsShape.h>
|
| static PhysicsShapePolygon * | create (const Vec2 *points, int count, const PhysicsMaterial &material=PHYSICSSHAPE_MATERIAL_DEFAULT, const Vec2 &offset=Vec2::ZERO) |
| local | create ( local points, local count, local PHYSICSSHAPE_MATERIAL_DEFAULT, local ZERO) |
| static float | calculateArea (const Vec2 *points, int count) |
| static float | calculateMoment (float mass, const Vec2 *points, int count, const Vec2 &offset=Vec2::ZERO) |
| local | calculateMoment ( local mass, local points, local count, local ZERO) |
| static void | recenterPoints (Vec2 *points, int count, const Vec2 ¢er=Vec2::ZERO) |
| | move the points to the center More...
|
| |
| local | recenterPoints ( local points, local count, local ZERO) |
| | move the points to the center More...
|
| |
| static Vec2 | getPolyonCenter (const Vec2 *points, int count) |
| | get center of the polyon points More...
|
| |
|
| bool | init (const Vec2 *points, int count, const PhysicsMaterial &material=PHYSICSSHAPE_MATERIAL_DEFAULT, const Vec2 &offset=Vec2::ZERO) |
| var | init ( var points, var count, var PHYSICSSHAPE_MATERIAL_DEFAULT, var ZERO) |
| local | init ( local points, local count, local PHYSICSSHAPE_MATERIAL_DEFAULT, local ZERO) |
| float | calculateArea () override |
| | calculate the area of this shape More...
|
| |
| virtual void | update (float delta) override |
| var | update ( var delta) |
| local | update ( local delta) |
| | PhysicsShapePolygon () |
| virtual | ~PhysicsShapePolygon () |
| bool | init (Type type) |
| PhysicsBodyInfo * | bodyInfo () const |
| | PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
|
| |
| local | bodyInfo () |
| | PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
|
| |
| void | setBody (PhysicsBody *body) |
| virtual void | setScale (float scale) |
| local | setScale ( local scale) |
| virtual void | setScale (float scaleX, float scaleY) |
| local | setScale ( local scaleX, local scaleY) |
| virtual void | setScaleX (float scaleX) |
| virtual void | setScaleY (float scaleY) |
| local | setScaleY ( local scaleY) |
| | PhysicsShape () |
| virtual | ~PhysicsShape ()=0 |
| | Ref () |
| | Constructor. More...
|
| |
| | Ref () |
| | Constructor. More...
|
| |
| static float calculateArea |
( |
const Vec2 * |
points, |
|
|
int |
count |
|
) |
| |
|
static |
| var calculateArea |
( |
var |
points, |
|
|
var |
count |
|
) |
| |
|
static |
| local calculateArea |
( |
local |
points, |
|
|
local |
count |
|
) |
| |
|
static |
calculate the area of this shape
Reimplemented from PhysicsShape.
calculate the area of this shape
Reimplemented from PhysicsShape.
calculate the area of this shape
Reimplemented from PhysicsShape.
| float calculateDefaultMoment |
( |
| ) |
|
|
overridevirtual |
Calculate the default moment value.
Reimplemented from PhysicsShape.
| var calculateDefaultMoment |
( |
| ) |
|
|
overridevirtual |
Calculate the default moment value.
Reimplemented from PhysicsShape.
| local calculateDefaultMoment |
( |
| ) |
|
|
overridevirtual |
Calculate the default moment value.
Reimplemented from PhysicsShape.
| static float calculateMoment |
( |
float |
mass, |
|
|
const Vec2 * |
points, |
|
|
int |
count, |
|
|
const Vec2 & |
offset = Vec2::ZERO |
|
) |
| |
|
static |
| var calculateMoment |
( |
var |
mass, |
|
|
var |
points, |
|
|
var |
count, |
|
|
var |
offset = Vec2::ZERO |
|
) |
| |
|
static |
| local calculateMoment |
( |
local |
mass, |
|
|
local |
points, |
|
|
local |
count, |
|
|
local |
offset = Vec2::ZERO |
|
) |
| |
|
static |
| var create |
( |
var |
points, |
|
|
var |
count, |
|
|
var |
material = PHYSICSSHAPE_MATERIAL_DEFAULT, |
|
|
var |
offset = Vec2::ZERO |
|
) |
| |
|
static |
| local create |
( |
local |
points, |
|
|
local |
count, |
|
|
local |
material = PHYSICSSHAPE_MATERIAL_DEFAULT, |
|
|
local |
offset = Vec2::ZERO |
|
) |
| |
|
static |
| virtual Vec2 getCenter |
( |
| ) |
|
|
overridevirtual |
| Vec2 getPoint |
( |
int |
i | ) |
const |
| local getPoint |
( |
local |
i | ) |
|
| void getPoints |
( |
Vec2 * |
outPoints | ) |
const |
| var getPoints |
( |
var |
outPoints | ) |
|
| local getPoints |
( |
local |
outPoints | ) |
|
| int getPointsCount |
( |
| ) |
const |
| var init |
( |
var |
points, |
|
|
var |
count, |
|
|
var |
material = PHYSICSSHAPE_MATERIAL_DEFAULT, |
|
|
var |
offset = Vec2::ZERO |
|
) |
| |
|
protected |
| local init |
( |
local |
points, |
|
|
local |
count, |
|
|
local |
material = PHYSICSSHAPE_MATERIAL_DEFAULT, |
|
|
local |
offset = Vec2::ZERO |
|
) |
| |
|
protected |
| virtual void update |
( |
float |
delta | ) |
|
|
overrideprotectedvirtual |
| local update |
( |
local |
delta | ) |
|
|
overrideprotectedvirtual |
The documentation for this class was generated from the following file: