initialize static member variable in cpp

This commit is contained in:
minggo 2013-12-06 11:46:13 +08:00
parent 9676821479
commit f02d15d71f
2 changed files with 11 additions and 5 deletions

View File

@ -55,6 +55,12 @@ NS_CC_BEGIN
const float PHYSICS_INFINITY = INFINITY;
extern const char* PHYSICSCONTACT_EVENT_NAME;
const int PhysicsWorld::DEBUGDRAW_NONE = 0x00;
const int PhysicsWorld::DEBUGDRAW_SHAPE = 0x01;
const int PhysicsWorld::DEBUGDRAW_JOINT = 0x02;
const int PhysicsWorld::DEBUGDRAW_CONTACT = 0x04;
const int PhysicsWorld::DEBUGDRAW_ALL = DEBUGDRAW_SHAPE | DEBUGDRAW_JOINT | DEBUGDRAW_CONTACT;
namespace
{
typedef struct RayCastCallbackInfo

View File

@ -83,11 +83,11 @@ typedef PhysicsRectQueryCallbackFunc PhysicsPointQueryCallbackFunc;
class PhysicsWorld
{
public:
static const int DEBUGDRAW_NONE = 0x00;
static const int DEBUGDRAW_SHAPE = 0x01;
static const int DEBUGDRAW_JOINT = 0x02;
static const int DEBUGDRAW_CONTACT = 0x04;
static const int DEBUGDRAW_ALL = DEBUGDRAW_SHAPE | DEBUGDRAW_JOINT | DEBUGDRAW_CONTACT;
static const int DEBUGDRAW_NONE;
static const int DEBUGDRAW_SHAPE;
static const int DEBUGDRAW_JOINT;
static const int DEBUGDRAW_CONTACT;
static const int DEBUGDRAW_ALL;
public:
/** Adds a joint to the physics world.*/