Add setUserIndex/getUserIndex (int index) to btCollisionShape
Share physics setup of BasicDemo between different graphics frameworks, see Demos\BasicDemo\BasicDemoPhysicsSetup.* Plan is to do this for all Bullet demos. Improve gwen performance and cursor navigation for tree control. tweak shadowmap size SimpleOpenGL3App::registerCubeShape accepts half extents
This commit is contained in:
@@ -28,8 +28,13 @@ ATTRIBUTE_ALIGNED16(class) btCollisionShape
|
||||
{
|
||||
protected:
|
||||
int m_shapeType;
|
||||
void* m_userPointer;
|
||||
|
||||
union
|
||||
{
|
||||
void* m_userPointer;
|
||||
int m_userIndex;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
@@ -131,6 +136,16 @@ public:
|
||||
return m_userPointer;
|
||||
}
|
||||
|
||||
void setUserIndex(int index)
|
||||
{
|
||||
m_userIndex = index;
|
||||
}
|
||||
|
||||
int getUserIndex() const
|
||||
{
|
||||
return m_userIndex;
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||
|
||||
Reference in New Issue
Block a user