Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h
| Show All 23 Lines | |||||
| ///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. | ///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. | ||||
| ATTRIBUTE_ALIGNED16(class) btCollisionShape | ATTRIBUTE_ALIGNED16(class) btCollisionShape | ||||
| { | { | ||||
| protected: | protected: | ||||
| int m_shapeType; | int m_shapeType; | ||||
| void* m_userPointer; | void* m_userPointer; | ||||
| int m_userIndex; | |||||
| public: | public: | ||||
| BT_DECLARE_ALIGNED_ALLOCATOR(); | BT_DECLARE_ALIGNED_ALLOCATOR(); | ||||
| btCollisionShape() : m_shapeType (INVALID_SHAPE_PROXYTYPE), m_userPointer(0) | btCollisionShape() : m_shapeType (INVALID_SHAPE_PROXYTYPE), m_userPointer(0), m_userIndex(-1) | ||||
| { | { | ||||
| } | } | ||||
| virtual ~btCollisionShape() | virtual ~btCollisionShape() | ||||
| { | { | ||||
| } | } | ||||
| ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. | ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. | ||||
| ▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | #endif //__SPU__ | ||||
| { | { | ||||
| m_userPointer = userPtr; | m_userPointer = userPtr; | ||||
| } | } | ||||
| void* getUserPointer() const | void* getUserPointer() const | ||||
| { | { | ||||
| return m_userPointer; | return m_userPointer; | ||||
| } | } | ||||
| void setUserIndex(int index) | |||||
| { | |||||
| m_userIndex = index; | |||||
| } | |||||
| int getUserIndex() const | |||||
| { | |||||
| return m_userIndex; | |||||
| } | |||||
| virtual int calculateSerializeBufferSize() const; | virtual int calculateSerializeBufferSize() const; | ||||
| ///fills the dataBuffer and returns the struct name (and 0 on failure) | ///fills the dataBuffer and returns the struct name (and 0 on failure) | ||||
| virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const; | virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const; | ||||
| virtual void serializeSingleShape(btSerializer* serializer) const; | virtual void serializeSingleShape(btSerializer* serializer) const; | ||||
| Show All 19 Lines | |||||