more work on hashed pairmanager. growing doesn't work yet, so need to allocate enough room for the overlapping pairs in advance.
boxbox reports contact point in B, rather then average point box, cylinder use halfextents corrected for scaling and margin. made the margin in this halfextents explicit in the 'getHalfExtentsWithMargin' and 'getHalfExtentsWithoutMargin' integrated changed for ODE quickstep solver replaced inline with SIMD_FORCE_INLINE some minor optimizations in the btSequentialImpulseConstraintSolver added cone drawing (for X,Y,Z cones)
This commit is contained in:
@@ -101,28 +101,28 @@ public:
|
||||
};
|
||||
|
||||
|
||||
inline bool mergesSimulationIslands() const
|
||||
SIMD_FORCE_INLINE bool mergesSimulationIslands() const
|
||||
{
|
||||
///static objects, kinematic and object without contact response don't merge islands
|
||||
return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0);
|
||||
}
|
||||
|
||||
|
||||
inline bool isStaticObject() const {
|
||||
SIMD_FORCE_INLINE bool isStaticObject() const {
|
||||
return (m_collisionFlags & CF_STATIC_OBJECT) != 0;
|
||||
}
|
||||
|
||||
inline bool isKinematicObject() const
|
||||
SIMD_FORCE_INLINE bool isKinematicObject() const
|
||||
{
|
||||
return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0;
|
||||
}
|
||||
|
||||
inline bool isStaticOrKinematicObject() const
|
||||
SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const
|
||||
{
|
||||
return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ;
|
||||
}
|
||||
|
||||
inline bool hasContactResponse() const {
|
||||
SIMD_FORCE_INLINE bool hasContactResponse() const {
|
||||
return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0;
|
||||
}
|
||||
|
||||
@@ -136,12 +136,12 @@ public:
|
||||
m_collisionShape = collisionShape;
|
||||
}
|
||||
|
||||
inline const btCollisionShape* getCollisionShape() const
|
||||
SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const
|
||||
{
|
||||
return m_collisionShape;
|
||||
}
|
||||
|
||||
inline btCollisionShape* getCollisionShape()
|
||||
SIMD_FORCE_INLINE btCollisionShape* getCollisionShape()
|
||||
{
|
||||
return m_collisionShape;
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@ int m_triangleCount;
|
||||
|
||||
void clearCache();
|
||||
|
||||
inline const btVector3& getAabbMin() const
|
||||
SIMD_FORCE_INLINE const btVector3& getAabbMin() const
|
||||
{
|
||||
return m_aabbMin;
|
||||
}
|
||||
inline const btVector3& getAabbMax() const
|
||||
SIMD_FORCE_INLINE const btVector3& getAabbMax() const
|
||||
{
|
||||
return m_aabbMax;
|
||||
}
|
||||
|
||||
@@ -109,8 +109,8 @@ btScalar btSphereBoxCollisionAlgorithm::getSphereDistance(btCollisionObject* box
|
||||
btVector3 bounds[2];
|
||||
btBoxShape* boxShape= (btBoxShape*)boxObj->getCollisionShape();
|
||||
|
||||
bounds[0] = -boxShape->getHalfExtents();
|
||||
bounds[1] = boxShape->getHalfExtents();
|
||||
bounds[0] = -boxShape->getHalfExtentsWithoutMargin();
|
||||
bounds[1] = boxShape->getHalfExtentsWithoutMargin();
|
||||
|
||||
margins = boxShape->getMargin();//also add sphereShape margin?
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ class btUnionFind
|
||||
|
||||
void reset(int N);
|
||||
|
||||
inline int getNumElements() const
|
||||
SIMD_FORCE_INLINE int getNumElements() const
|
||||
{
|
||||
return int(m_elements.size());
|
||||
}
|
||||
inline bool isRoot(int x) const
|
||||
SIMD_FORCE_INLINE bool isRoot(int x) const
|
||||
{
|
||||
return (x == m_elements[x].m_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user