cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhysicsShape Class Referenceabstract

A shape for body. More...

#include <CCPhysicsShape.h>

Inheritance diagram for PhysicsShape:
Object PhysicsShapeBox PhysicsShapeCircle PhysicsShapeEdgeBox PhysicsShapeEdgeChain PhysicsShapeEdgePolygon PhysicsShapeEdgeSegment PhysicsShapePolygon

Public Types

enum  Type {
  UNKNOWN, CIRCLE, BOX, POLYGEN,
  EDGESEGMENT, EDGEBOX, EDGEPOLYGEN, EDGECHAIN
}
 

Public Member Functions

PhysicsBodygetBody ()
Type getType ()
- 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)

Protected Member Functions

bool init (PhysicsBody *body, Type type)
var init ( var body, var type)
local init ( local body, 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 addToBody ()
 PhysicsShape ()
virtual ~PhysicsShape ()=0

Protected Attributes

PhysicsBody_body
PhysicsShapeInfo_info
local _info
Type _type
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Friends

class PhysicsWorld
class PhysicsBody

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Detailed Description

A shape for body.

You do not create PhysicsWorld objects directly, instead, you can view PhysicsBody to see how to create it.

Member Enumeration Documentation

enum Type
strong
Enumerator
UNKNOWN 
CIRCLE 
BOX 
POLYGEN 
EDGESEGMENT 
EDGEBOX 
EDGEPOLYGEN 
EDGECHAIN 
var Type
strong
Enumerator
UNKNOWN 
CIRCLE 
BOX 
POLYGEN 
EDGESEGMENT 
EDGEBOX 
EDGEPOLYGEN 
EDGECHAIN 
local Type
strong
Enumerator
UNKNOWN 
CIRCLE 
BOX 
POLYGEN 
EDGESEGMENT 
EDGEBOX 
EDGEPOLYGEN 
EDGECHAIN 

Constructor & Destructor Documentation

PhysicsShape ( )
protected
var PhysicsShape ( )
protected
local PhysicsShape ( )
protected
virtual ~PhysicsShape ( )
protectedpure virtual
var ~PhysicsShape ( )
protectedpure virtual
local ~PhysicsShape ( )
protectedpure virtual

Member Function Documentation

void addToBody ( )
protected
var addToBody ( )
protected
local addToBody ( )
protected
PhysicsBodyInfo* bodyInfo ( ) 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 bodyInfo ( )
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 bodyInfo ( )
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.

PhysicsBody* getBody ( )
inline
Type getType ( )
inline
var getType ( )
inline
local getType ( )
inline
bool init ( PhysicsBody body,
Type  type 
)
protected
var init ( var  body,
var  type 
)
protected
local init ( local  body,
local  type 
)
protected

Friends And Related Function Documentation

friend class PhysicsBody
friend
var PhysicsBody
friend
local PhysicsBody
friend
friend class PhysicsWorld
friend
var PhysicsWorld
friend
local PhysicsWorld
friend

Member Data Documentation

PhysicsBody* _body
protected
var _body
protected
local _body
protected
PhysicsShapeInfo* _info
protected
var _info
protected
local _info
protected
Type _type
protected
var _type
protected
local _type
protected

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