enabled the vehicle demo again (still needs lots of tuning before it drives well)
fixed some warnings
This commit is contained in:
@@ -66,7 +66,7 @@ class btOverlappingPairCache : public btBroadphaseInterface
|
||||
|
||||
inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
|
||||
{
|
||||
bool collides = proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask;
|
||||
bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
|
||||
collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
|
||||
|
||||
return collides;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
int getNumManifolds() const
|
||||
{
|
||||
return m_manifoldsPtr.size();
|
||||
return int( m_manifoldsPtr.size());
|
||||
}
|
||||
|
||||
btPersistentManifold** getInternalManifoldPointer()
|
||||
|
||||
@@ -79,26 +79,26 @@ struct btCollisionObject
|
||||
inline bool mergesSimulationIslands() const
|
||||
{
|
||||
///static objects, kinematic and object without contact response don't merge islands
|
||||
return !(m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OJBECT | CF_NO_CONTACT_RESPONSE) );
|
||||
return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OJBECT | CF_NO_CONTACT_RESPONSE) )==0);
|
||||
}
|
||||
|
||||
|
||||
inline bool isStaticObject() const {
|
||||
return m_collisionFlags & CF_STATIC_OBJECT;
|
||||
return (m_collisionFlags & CF_STATIC_OBJECT) != 0;
|
||||
}
|
||||
|
||||
inline bool isKinematicObject() const
|
||||
{
|
||||
return m_collisionFlags & CF_KINEMATIC_OJBECT;
|
||||
return (m_collisionFlags & CF_KINEMATIC_OJBECT) != 0;
|
||||
}
|
||||
|
||||
inline bool isStaticOrKinematicObject() const
|
||||
{
|
||||
return m_collisionFlags & (CF_KINEMATIC_OJBECT | CF_STATIC_OBJECT);
|
||||
return (m_collisionFlags & (CF_KINEMATIC_OJBECT | CF_STATIC_OBJECT)) != 0 ;
|
||||
}
|
||||
|
||||
inline bool hasContactResponse() const {
|
||||
return !(m_collisionFlags & CF_NO_CONTACT_RESPONSE);
|
||||
return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
int getNumCollisionObjects() const
|
||||
{
|
||||
return m_collisionObjects.size();
|
||||
return int(m_collisionObjects.size());
|
||||
}
|
||||
|
||||
/// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
|
||||
#include "LinearMath/btScalar.h"
|
||||
#include "btSimulationIslandManager.h"
|
||||
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
|
||||
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
|
||||
@@ -51,7 +53,7 @@ void btSimulationIslandManager::findUnions(btDispatcher* dispatcher)
|
||||
void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher)
|
||||
{
|
||||
|
||||
initUnionFind(colWorld->getCollisionObjectArray().size());
|
||||
initUnionFind( int (colWorld->getCollisionObjectArray().size()));
|
||||
|
||||
// put the index into m_controllers into m_tag
|
||||
{
|
||||
@@ -253,7 +255,7 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,
|
||||
}
|
||||
}
|
||||
|
||||
int numManifolds = islandmanifold.size();
|
||||
int numManifolds = int (islandmanifold.size());
|
||||
|
||||
// Sort manifolds, based on islands
|
||||
// Sort the vector using predicate and std::sort
|
||||
|
||||
@@ -45,7 +45,7 @@ class btUnionFind
|
||||
|
||||
inline int getNumElements() const
|
||||
{
|
||||
return m_elements.size();
|
||||
return int(m_elements.size());
|
||||
}
|
||||
inline bool isRoot(int x) const
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
int getNumChildShapes() const
|
||||
{
|
||||
return m_childShapes.size();
|
||||
return int (m_childShapes.size());
|
||||
}
|
||||
|
||||
btCollisionShape* getChildShape(int index)
|
||||
|
||||
Reference in New Issue
Block a user