cocos2d-x  3.0alpha1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhysicsShapeCircle Class Reference

A circle shape. More...

#include <CCPhysicsShape.h>

Inheritance diagram for PhysicsShapeCircle:
PhysicsShape Object

Public Member Functions

virtual float calculateDefaultArea () override
virtual float calculateDefaultMoment () override
float getRadius () const
virtual Point getOffset () override
var getOffset ()
local getOffset ()
- Public Member Functions inherited from PhysicsShape
PhysicsBodygetBody () const
Type getType () const
float getArea () const
float getMoment () const
void setMoment (float moment)
local setMoment ( local moment)
void setTag (int tag)
int getTag () const
float getMass () const
void setMass (float mass)
float getDensity () const
void setDensity (float density)
void setRestitution (float restitution)
local setRestitution ( local restitution)
void setFriction (float friction)
void setMaterial (const PhysicsMaterial &material)
virtual Point getCenter ()
local getCenter ()
bool containsPoint (const Point &point) const
void setCategoryBitmask (int bitmask)
var setCategoryBitmask ( var bitmask)
local setCategoryBitmask ( local bitmask)
int getCategoryBitmask () const
void setContactTestBitmask (int bitmask)
int getContactTestBitmask () const
void setCollisionBitmask (int bitmask)
int getCollisionBitmask () const
void setGroup (int group)
int getGroup ()
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static PhysicsShapeCirclecreate (float radius, const PhysicsMaterial &material=PHYSICSSHAPE_MATERIAL_DEFAULT, const Point &offset=Point(0, 0))
local create ( local radius, local PHYSICSSHAPE_MATERIAL_DEFAULT, local 0)
static float calculateArea (float radius)
static float calculateMoment (float mass, float radius, const Point &offset=Point::ZERO)
local calculateMoment ( local mass, local radius, local ZERO)
- Static Public Member Functions inherited from PhysicsShape
static PointrecenterPoints (Point *points, int count, const Point &center=Point::ZERO)
local recenterPoints ( local points, local count, local ZERO)
static Point getPolyonCenter (const Point *points, int count)
var getPolyonCenter ( var points, var count)
local getPolyonCenter ( local points, local count)

Protected Member Functions

bool init (float radius, const PhysicsMaterial &material=PHYSICSSHAPE_MATERIAL_DEFAULT, const Point &offset=Point::ZERO)
 PhysicsShapeCircle ()
virtual ~PhysicsShapeCircle ()
- Protected Member Functions inherited from PhysicsShape
bool init (Type type)
local init ( local type)
PhysicsBodyInfobodyInfo () const
 PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
 
var bodyInfo ()
 PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. More...
 
void setBody (PhysicsBody *body)
 PhysicsShape ()
virtual ~PhysicsShape ()=0

Additional Inherited Members

- Public Types inherited from PhysicsShape
enum  Type {
  UNKNOWN, CIRCLE, BOX, POLYGEN,
  EDGESEGMENT, EDGEBOX, EDGEPOLYGEN, EDGECHAIN
}
 
- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 
- Protected Attributes inherited from PhysicsShape
PhysicsBody_body
PhysicsShapeInfo_info
local _info
Type _type
float _area
var _area
local _area
float _mass
var _mass
local _mass
float _moment
var _moment
local _moment
PhysicsMaterial _material
var _material
local _material
int _tag
int _categoryBitmask
var _categoryBitmask
local _categoryBitmask
int _collisionBitmask
var _collisionBitmask
local _collisionBitmask
int _contactTestBitmask
var _contactTestBitmask
local _contactTestBitmask
int _group

Detailed Description

A circle shape.

Constructor & Destructor Documentation

PhysicsShapeCircle ( )
protected
var PhysicsShapeCircle ( )
protected
local PhysicsShapeCircle ( )
protected
virtual ~PhysicsShapeCircle ( )
protectedvirtual
var ~PhysicsShapeCircle ( )
protectedvirtual
local ~PhysicsShapeCircle ( )
protectedvirtual

Member Function Documentation

static float calculateArea ( float  radius)
static
var calculateArea ( var  radius)
static
local calculateArea ( local  radius)
static
virtual float calculateDefaultArea ( )
overridevirtual

Reimplemented from PhysicsShape.

var calculateDefaultArea ( )
overridevirtual

Reimplemented from PhysicsShape.

local calculateDefaultArea ( )
overridevirtual

Reimplemented from PhysicsShape.

virtual float
calculateDefaultMoment
( )
overridevirtual

Reimplemented from PhysicsShape.

var calculateDefaultMoment ( )
overridevirtual

Reimplemented from PhysicsShape.

local calculateDefaultMoment ( )
overridevirtual

Reimplemented from PhysicsShape.

static float calculateMoment ( float  mass,
float  radius,
const Point offset = Point::ZERO 
)
static
var calculateMoment ( var  mass,
var  radius,
var  offset = Point::ZERO 
)
static
local calculateMoment ( local  mass,
local  radius,
local  offset = Point::ZERO 
)
static
static PhysicsShapeCircle* create ( float  radius,
const PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT,
const Point offset = Point(0, 0) 
)
static
var create ( var  radius,
var  material = PHYSICSSHAPE_MATERIAL_DEFAULT,
var  offset = Point(0, 0) 
)
static
local create ( local  radius,
local  material = PHYSICSSHAPE_MATERIAL_DEFAULT,
local  offset = Point(0, 0) 
)
static
virtual Point getOffset ( )
overridevirtual

Reimplemented from PhysicsShape.

var getOffset ( )
overridevirtual

Reimplemented from PhysicsShape.

local getOffset ( )
overridevirtual

Reimplemented from PhysicsShape.

float getRadius ( ) const
var getRadius ( )
local getRadius ( )
bool init ( float  radius,
const PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT,
const Point offset = Point::ZERO 
)
protected
var init ( var  radius,
var  material = PHYSICSSHAPE_MATERIAL_DEFAULT,
var  offset = Point::ZERO 
)
protected
local init ( local  radius,
local  material = PHYSICSSHAPE_MATERIAL_DEFAULT,
local  offset = Point::ZERO 
)
protected

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