Assorted cleanup of compilation warnings. Also fixed some actual errors:
#include "renderTexture.h"...when the file is actually called 'RenderTexture.h'.
This commit is contained in:
@@ -146,14 +146,10 @@ void ConcaveDemo::initPhysics()
|
|||||||
totalVerts,(float*) &gVertices[0].x(),vertStride);
|
totalVerts,(float*) &gVertices[0].x(),vertStride);
|
||||||
|
|
||||||
btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays);
|
btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays);
|
||||||
|
|
||||||
|
|
||||||
|
//btConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
|
||||||
// btConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
|
//btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
||||||
|
//btOverlappingPairCache* broadphase = new btSimpleBroadphase();
|
||||||
btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
|
||||||
|
|
||||||
btOverlappingPairCache* broadphase = new btSimpleBroadphase();
|
|
||||||
|
|
||||||
m_dynamicsWorld = new btDiscreteDynamicsWorld();
|
m_dynamicsWorld = new btDiscreteDynamicsWorld();
|
||||||
|
|
||||||
|
|||||||
@@ -52,11 +52,8 @@ void ConstraintDemo::initPhysics()
|
|||||||
{
|
{
|
||||||
//ConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
|
//ConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
|
||||||
//ConstraintSolver* solver = new OdeConstraintSolver;
|
//ConstraintSolver* solver = new OdeConstraintSolver;
|
||||||
|
//btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
||||||
btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
|
//btOverlappingPairCache* broadphase = new btSimpleBroadphase();
|
||||||
|
|
||||||
btOverlappingPairCache* broadphase = new btSimpleBroadphase();
|
|
||||||
|
|
||||||
|
|
||||||
m_dynamicsWorld = new btDiscreteDynamicsWorld();
|
m_dynamicsWorld = new btDiscreteDynamicsWorld();
|
||||||
|
|
||||||
@@ -80,8 +77,6 @@ void ConstraintDemo::initPhysics()
|
|||||||
clientResetScene();
|
clientResetScene();
|
||||||
|
|
||||||
{
|
{
|
||||||
int constraintId;
|
|
||||||
|
|
||||||
btVector3 pivotInA(CUBE_HALF_EXTENTS,-CUBE_HALF_EXTENTS,-CUBE_HALF_EXTENTS);
|
btVector3 pivotInA(CUBE_HALF_EXTENTS,-CUBE_HALF_EXTENTS,-CUBE_HALF_EXTENTS);
|
||||||
btVector3 axisInA(0,0,1);
|
btVector3 axisInA(0,0,1);
|
||||||
|
|
||||||
@@ -110,7 +105,6 @@ void ConstraintDemo::clientMoveAndDisplay()
|
|||||||
|
|
||||||
glFlush();
|
glFlush();
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -479,9 +479,6 @@ void DemoApplication::mouseFunc(int button, int state, int x, int y)
|
|||||||
//apply an impulse
|
//apply an impulse
|
||||||
if (m_dynamicsWorld)
|
if (m_dynamicsWorld)
|
||||||
{
|
{
|
||||||
float hit[3];
|
|
||||||
float normal[3];
|
|
||||||
|
|
||||||
btCollisionWorld::ClosestRayResultCallback rayCallback(m_cameraPosition,rayTo);
|
btCollisionWorld::ClosestRayResultCallback rayCallback(m_cameraPosition,rayTo);
|
||||||
m_dynamicsWorld->rayTest(m_cameraPosition,rayTo,rayCallback);
|
m_dynamicsWorld->rayTest(m_cameraPosition,rayTo,rayCallback);
|
||||||
if (rayCallback.HasHit())
|
if (rayCallback.HasHit())
|
||||||
@@ -517,8 +514,6 @@ void DemoApplication::mouseFunc(int button, int state, int x, int y)
|
|||||||
//add a point to point constraint for picking
|
//add a point to point constraint for picking
|
||||||
if (m_dynamicsWorld)
|
if (m_dynamicsWorld)
|
||||||
{
|
{
|
||||||
float hit[3];
|
|
||||||
float normal[3];
|
|
||||||
btCollisionWorld::ClosestRayResultCallback rayCallback(m_cameraPosition,rayTo);
|
btCollisionWorld::ClosestRayResultCallback rayCallback(m_cameraPosition,rayTo);
|
||||||
m_dynamicsWorld->rayTest(m_cameraPosition,rayTo,rayCallback);
|
m_dynamicsWorld->rayTest(m_cameraPosition,rayTo,rayCallback);
|
||||||
if (rayCallback.HasHit())
|
if (rayCallback.HasHit())
|
||||||
@@ -768,7 +763,7 @@ void DemoApplication::renderme()
|
|||||||
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
||||||
yStart += yIncr;
|
yStart += yIncr;
|
||||||
|
|
||||||
bool useBulletLCP = !(getDebugMode() & btIDebugDraw::DBG_DisableBulletLCP);
|
//bool useBulletLCP = !(getDebugMode() & btIDebugDraw::DBG_DisableBulletLCP);
|
||||||
|
|
||||||
bool useCCD = (getDebugMode() & btIDebugDraw::DBG_EnableCCD);
|
bool useCCD = (getDebugMode() & btIDebugDraw::DBG_EnableCCD);
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "renderTexture.h"
|
#include "RenderTexture.h"
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include "BMF_FontData.h"
|
#include "BMF_FontData.h"
|
||||||
|
|
||||||
|
|||||||
@@ -51,3 +51,4 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif //RENDER_TEXTURE_H
|
#endif //RENDER_TEXTURE_H
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Very basic raytracer, rendering into a texture.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "renderTexture.h"
|
#include "RenderTexture.h"
|
||||||
|
|
||||||
btVoronoiSimplexSolver simplexSolver;
|
btVoronoiSimplexSolver simplexSolver;
|
||||||
|
|
||||||
|
|||||||
@@ -395,8 +395,6 @@ void initCubeVBO ()
|
|||||||
for ( int i = 0 ; i < (noVertexTextureSupport ? 1 : TEX_SIZE) ; i++ )
|
for ( int i = 0 ; i < (noVertexTextureSupport ? 1 : TEX_SIZE) ; i++ )
|
||||||
for ( int j = 0 ; j < (noVertexTextureSupport ? 1 : TEX_SIZE) ; j++ )
|
for ( int j = 0 ; j < (noVertexTextureSupport ? 1 : TEX_SIZE) ; j++ )
|
||||||
{
|
{
|
||||||
int n = i * TEX_SIZE + j ;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
I use the colour data to set which cube is which in
|
I use the colour data to set which cube is which in
|
||||||
the physics textures.
|
the physics textures.
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ subject to the following restrictions:
|
|||||||
#include "btCollisionObject.h"
|
#include "btCollisionObject.h"
|
||||||
|
|
||||||
btCollisionObject::btCollisionObject()
|
btCollisionObject::btCollisionObject()
|
||||||
: m_collisionFlags(0),
|
: m_broadphaseHandle(0),
|
||||||
|
m_collisionShape(0),
|
||||||
|
m_collisionFlags(0),
|
||||||
m_activationState1(1),
|
m_activationState1(1),
|
||||||
m_deactivationTime(0.f),
|
m_deactivationTime(0.f),
|
||||||
m_broadphaseHandle(0),
|
|
||||||
m_collisionShape(0),
|
|
||||||
m_hitFraction(1.f),
|
m_hitFraction(1.f),
|
||||||
m_ccdSweptShereRadius(0.f),
|
m_ccdSweptShereRadius(0.f),
|
||||||
m_ccdSquareMotionTreshold(0.f)
|
m_ccdSquareMotionTreshold(0.f)
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ void btSphereBoxCollisionAlgorithm::processCollision (btBroadphaseProxy*,btBroad
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
btSphereShape* sphere0 = (btSphereShape*)m_sphereColObj ->m_collisionShape;
|
btSphereShape* sphere0 = (btSphereShape*)m_sphereColObj ->m_collisionShape;
|
||||||
btBoxShape* box = (btBoxShape*)m_boxColObj->m_collisionShape;
|
|
||||||
|
|
||||||
btVector3 normalOnSurfaceB;
|
btVector3 normalOnSurfaceB;
|
||||||
btVector3 pOnBox,pOnSphere;
|
btVector3 pOnBox,pOnSphere;
|
||||||
|
|||||||
@@ -61,4 +61,5 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //SPHERE_BOX_COLLISION_ALGORITHM_H
|
#endif //SPHERE_BOX_COLLISION_ALGORITHM_H
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ subject to the following restrictions:
|
|||||||
#include "btConvexShape.h"
|
#include "btConvexShape.h"
|
||||||
|
|
||||||
btConvexShape::btConvexShape()
|
btConvexShape::btConvexShape()
|
||||||
:m_collisionMargin(CONVEX_DISTANCE_MARGIN),
|
: m_localScaling(1.f,1.f,1.f),
|
||||||
m_localScaling(1.f,1.f,1.f)
|
m_collisionMargin(CONVEX_DISTANCE_MARGIN)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ void btDiscreteDynamicsWorld::updateVehicles(float timeStep)
|
|||||||
{
|
{
|
||||||
BEGIN_PROFILE("updateVehicles");
|
BEGIN_PROFILE("updateVehicles");
|
||||||
|
|
||||||
for (int i=0;i<m_vehicles.size();i++)
|
for (unsigned int i=0;i<m_vehicles.size();i++)
|
||||||
{
|
{
|
||||||
btRaycastVehicle* vehicle = m_vehicles[i];
|
btRaycastVehicle* vehicle = m_vehicles[i];
|
||||||
vehicle->updateVehicle( timeStep);
|
vehicle->updateVehicle( timeStep);
|
||||||
@@ -128,7 +128,7 @@ void btDiscreteDynamicsWorld::updateActivationState(float timeStep)
|
|||||||
{
|
{
|
||||||
BEGIN_PROFILE("updateActivationState");
|
BEGIN_PROFILE("updateActivationState");
|
||||||
|
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
@@ -326,7 +326,7 @@ void btDiscreteDynamicsWorld::updateAabbs()
|
|||||||
|
|
||||||
btVector3 colorvec(1,0,0);
|
btVector3 colorvec(1,0,0);
|
||||||
btTransform predictedTrans;
|
btTransform predictedTrans;
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@ void btDiscreteDynamicsWorld::integrateTransforms(float timeStep)
|
|||||||
{
|
{
|
||||||
BEGIN_PROFILE("integrateTransforms");
|
BEGIN_PROFILE("integrateTransforms");
|
||||||
btTransform predictedTrans;
|
btTransform predictedTrans;
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
@@ -375,7 +375,7 @@ void btDiscreteDynamicsWorld::integrateTransforms(float timeStep)
|
|||||||
void btDiscreteDynamicsWorld::predictUnconstraintMotion(float timeStep)
|
void btDiscreteDynamicsWorld::predictUnconstraintMotion(float timeStep)
|
||||||
{
|
{
|
||||||
BEGIN_PROFILE("predictUnconstraintMotion");
|
BEGIN_PROFILE("predictUnconstraintMotion");
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
@@ -427,4 +427,6 @@ void btDiscreteDynamicsWorld::startProfiling(float timeStep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //USE_QUICKPROF
|
#endif //USE_QUICKPROF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -289,3 +289,4 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void btSimpleDynamicsWorld::stepSimulation(float timeStep)
|
|||||||
void btSimpleDynamicsWorld::updateAabbs()
|
void btSimpleDynamicsWorld::updateAabbs()
|
||||||
{
|
{
|
||||||
btTransform predictedTrans;
|
btTransform predictedTrans;
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
@@ -93,7 +93,7 @@ void btSimpleDynamicsWorld::updateAabbs()
|
|||||||
void btSimpleDynamicsWorld::integrateTransforms(float timeStep)
|
void btSimpleDynamicsWorld::integrateTransforms(float timeStep)
|
||||||
{
|
{
|
||||||
btTransform predictedTrans;
|
btTransform predictedTrans;
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
@@ -112,7 +112,7 @@ void btSimpleDynamicsWorld::integrateTransforms(float timeStep)
|
|||||||
|
|
||||||
void btSimpleDynamicsWorld::predictUnconstraintMotion(float timeStep)
|
void btSimpleDynamicsWorld::predictUnconstraintMotion(float timeStep)
|
||||||
{
|
{
|
||||||
for (int i=0;i<m_collisionObjects.size();i++)
|
for (unsigned int i=0;i<m_collisionObjects.size();i++)
|
||||||
{
|
{
|
||||||
btCollisionObject* colObj = m_collisionObjects[i];
|
btCollisionObject* colObj = m_collisionObjects[i];
|
||||||
btRigidBody* body = btRigidBody::upcast(colObj);
|
btRigidBody* body = btRigidBody::upcast(colObj);
|
||||||
|
|||||||
@@ -683,4 +683,5 @@ std::string btProfiler::createStatsString(BlockTimingMethod method)
|
|||||||
|
|
||||||
#endif //USE_QUICKPROF
|
#endif //USE_QUICKPROF
|
||||||
|
|
||||||
#endif //QUICK_PROF_H
|
#endif //QUICK_PROF_H
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user