Made the move from sourceforge to googlecode (no svn sync any longer)
Fixed BulletColladaConverter load/save Removed btTypedUserInfo Added btHashMap Fixed btCapsuleShape
This commit is contained in:
@@ -99,9 +99,9 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
|
||||
int m_unusedPadding; //making the structure 16 bytes, better for alignment etc.
|
||||
|
||||
SIMD_FORCE_INLINE int getUid()
|
||||
SIMD_FORCE_INLINE int getUid() const
|
||||
{
|
||||
return m_uniqueId;//(int)this;
|
||||
return m_uniqueId;
|
||||
}
|
||||
|
||||
//used for memory pools
|
||||
|
||||
@@ -138,6 +138,11 @@ btBroadphasePair* btOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, bt
|
||||
|
||||
int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1);
|
||||
|
||||
if (hash >= m_hashTable.size())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int index = m_hashTable[hash];
|
||||
while (index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,6 @@ btCollisionObject::btCollisionObject()
|
||||
m_deactivationTime(btScalar(0.)),
|
||||
m_friction(btScalar(0.5)),
|
||||
m_restitution(btScalar(0.)),
|
||||
m_typedUserInfo (NULL),
|
||||
m_userObjectPointer(0),
|
||||
m_internalOwner(0),
|
||||
m_hitFraction(btScalar(1.)),
|
||||
|
||||
@@ -27,7 +27,6 @@ subject to the following restrictions:
|
||||
|
||||
struct btBroadphaseProxy;
|
||||
class btCollisionShape;
|
||||
class btTypedUserInfo;
|
||||
#include "LinearMath/btMotionState.h"
|
||||
#include "LinearMath/btAlignedAllocator.h"
|
||||
|
||||
@@ -70,8 +69,6 @@ protected:
|
||||
///m_internalOwner is reserved to point to Bullet's btRigidBody. Don't use this, use m_userObjectPointer instead.
|
||||
void* m_internalOwner;
|
||||
|
||||
btTypedUserInfo* m_typedUserInfo;
|
||||
|
||||
///time of impact calculation
|
||||
btScalar m_hitFraction;
|
||||
|
||||
@@ -337,15 +334,6 @@ public:
|
||||
m_userObjectPointer = userPointer;
|
||||
}
|
||||
|
||||
btTypedUserInfo* getTypedUserInfo () const
|
||||
{
|
||||
return m_typedUserInfo;
|
||||
}
|
||||
|
||||
void setTypedUserInfo (btTypedUserInfo* typedUserInfo)
|
||||
{
|
||||
m_typedUserInfo = typedUserInfo;
|
||||
}
|
||||
|
||||
inline bool checkCollideWith(btCollisionObject* co)
|
||||
{
|
||||
|
||||
@@ -112,7 +112,6 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i
|
||||
btCollisionShape* tmpShape = ob->getCollisionShape();
|
||||
|
||||
//copy over user pointers to temporary shape
|
||||
tm.setTypedUserInfo(tmpShape->getTypedUserInfo());
|
||||
tm.setUserPointer(tmpShape->getUserPointer());
|
||||
|
||||
ob->setCollisionShape( &tm );
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
virtual void getAabb (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
|
||||
{
|
||||
btVector3 halfExtents(getRadius(),getRadius(),getRadius());
|
||||
halfExtents[m_upAxis] = getRadius()*btScalar(2.0) + btScalar(0.5)*getHalfHeight();
|
||||
halfExtents[m_upAxis] = getRadius() + getHalfHeight();
|
||||
btMatrix3x3 abs_b = t.getBasis().absolute();
|
||||
btPoint3 center = t.getOrigin();
|
||||
btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
|
||||
|
||||
@@ -16,7 +16,6 @@ subject to the following restrictions:
|
||||
#ifndef COLLISION_SHAPE_H
|
||||
#define COLLISION_SHAPE_H
|
||||
|
||||
class btTypedUserInfo;
|
||||
#include "LinearMath/btTransform.h"
|
||||
#include "LinearMath/btVector3.h"
|
||||
#include "LinearMath/btMatrix3x3.h"
|
||||
@@ -28,11 +27,10 @@ class btCollisionShape
|
||||
{
|
||||
|
||||
void* m_userPointer;
|
||||
btTypedUserInfo* m_typedUserInfo;
|
||||
|
||||
public:
|
||||
|
||||
btCollisionShape() : m_userPointer(0), m_typedUserInfo (0)
|
||||
btCollisionShape() : m_userPointer(0)
|
||||
{
|
||||
}
|
||||
virtual ~btCollisionShape()
|
||||
@@ -105,15 +103,6 @@ public:
|
||||
return m_userPointer;
|
||||
}
|
||||
|
||||
btTypedUserInfo* getTypedUserInfo () const
|
||||
{
|
||||
return m_typedUserInfo;
|
||||
}
|
||||
|
||||
void setTypedUserInfo (btTypedUserInfo* typedUserInfo)
|
||||
{
|
||||
m_typedUserInfo = typedUserInfo;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //COLLISION_SHAPE_H
|
||||
|
||||
@@ -83,6 +83,7 @@ class btStridingMeshInterface
|
||||
m_scaling = scaling;
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user