Clean up about a bazillion compilation warnings.
This commit is contained in:
@@ -33,10 +33,10 @@ int gNumManifold = 0;
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms)
|
||||
:m_useIslands(true),
|
||||
m_convexConvexCreateFunc(0),
|
||||
btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms):
|
||||
m_count(0),
|
||||
m_useIslands(true),
|
||||
m_convexConvexCreateFunc(0),
|
||||
m_convexConcaveCreateFunc(0),
|
||||
m_swappedConvexConcaveCreateFunc(0),
|
||||
m_compoundCreateFunc(0),
|
||||
@@ -62,8 +62,8 @@ m_emptyCreateFunc(0)
|
||||
#ifndef BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION
|
||||
|
||||
btCollisionDispatcher::btCollisionDispatcher ():
|
||||
m_useIslands(true),
|
||||
m_count(0)
|
||||
m_count(0),
|
||||
m_useIslands(true)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispa
|
||||
///Time of Impact, Closest Points and Penetration Depth.
|
||||
class btCollisionDispatcher : public btDispatcher
|
||||
{
|
||||
int m_count;
|
||||
|
||||
std::vector<btPersistentManifold*> m_manifoldsPtr;
|
||||
|
||||
@@ -68,7 +69,6 @@ class btCollisionDispatcher : public btDispatcher
|
||||
|
||||
public:
|
||||
|
||||
|
||||
///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
|
||||
void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc);
|
||||
|
||||
@@ -92,8 +92,6 @@ public:
|
||||
return m_manifoldsPtr[index];
|
||||
}
|
||||
|
||||
int m_count;
|
||||
|
||||
///the default constructor creates/register default collision algorithms, for convex, compound and concave shape support
|
||||
btCollisionDispatcher ();
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVecto
|
||||
}
|
||||
|
||||
|
||||
for (size_t i=0;i<m_points.size();i++)
|
||||
for (int i=0;i<m_points.size();i++)
|
||||
{
|
||||
btPoint3 vtx = m_points[i] * m_localScaling;
|
||||
|
||||
@@ -73,7 +73,7 @@ void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const
|
||||
supportVerticesOut[i][3] = btScalar(-1e30);
|
||||
}
|
||||
}
|
||||
for (size_t i=0;i<m_points.size();i++)
|
||||
for (int i=0;i<m_points.size();i++)
|
||||
{
|
||||
btPoint3 vtx = m_points[i] * m_localScaling;
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
|
||||
{
|
||||
|
||||
btVector3 halfExtents = (aabbMax - aabbMin) * btScalar(0.5);
|
||||
btScalar radius = halfExtents.length();
|
||||
btVector3 center = (aabbMax + aabbMin) * btScalar(0.5);
|
||||
|
||||
//TODO
|
||||
@@ -60,6 +59,7 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
|
||||
btVector3 projectedCenter = center - (m_planeNormal.dot(center) - m_planeConstant)*m_planeNormal;
|
||||
|
||||
btVector3 triangle[3];
|
||||
btScalar radius = halfExtents.length();
|
||||
triangle[0] = projectedCenter + tangentDir0*radius + tangentDir1*radius;
|
||||
triangle[1] = projectedCenter + tangentDir0*radius - tangentDir1*radius;
|
||||
triangle[2] = projectedCenter - tangentDir0*radius - tangentDir1*radius;
|
||||
|
||||
@@ -723,10 +723,10 @@ class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIn
|
||||
|
||||
public:
|
||||
|
||||
DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color)
|
||||
: m_debugDrawer(debugDrawer),
|
||||
m_worldTrans(worldTrans),
|
||||
m_color(color)
|
||||
DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color) :
|
||||
m_debugDrawer(debugDrawer),
|
||||
m_color(color),
|
||||
m_worldTrans(worldTrans)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ static int uniqueId = 0;
|
||||
|
||||
btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution)
|
||||
:
|
||||
m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)),
|
||||
m_angularFactor(btScalar(1.)),
|
||||
m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
|
||||
m_linearDamping(btScalar(0.)),
|
||||
m_angularDamping(btScalar(0.5)),
|
||||
m_optionalMotionState(motionState),
|
||||
|
||||
@@ -41,7 +41,9 @@ void* btAlignedAlloc (int size, int alignment)
|
||||
|
||||
void btAlignedFree (void* ptr)
|
||||
{
|
||||
delete ptr;
|
||||
delete [] (char*) ptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -174,4 +174,6 @@ class btAlignedObjectArray
|
||||
|
||||
};
|
||||
|
||||
#endif //BT_OBJECT_ARRAY__
|
||||
#endif //BT_OBJECT_ARRAY__
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user