Contribution to add optional double precision floating point support. Define BT_USE_DOUBLE_PRECISION for all involved libraries/apps.
This commit is contained in:
@@ -19,13 +19,13 @@ subject to the following restrictions:
|
||||
//#define CHECK_MEMORY_LEAKS 1
|
||||
|
||||
int gNumObjects = 120;
|
||||
#define HALF_EXTENTS 1.f
|
||||
#define HALF_EXTENTS btScalar(1.)
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#include "LinearMath/btIDebugDraw.h"
|
||||
#include "GLDebugDrawer.h"
|
||||
#include <stdio.h> //printf debugging
|
||||
float deltaTime = 1.f/60.f;
|
||||
float gCollisionMargin = 0.05f;
|
||||
btScalar deltaTime = btScalar(1./60.);
|
||||
btScalar gCollisionMargin = btScalar(0.05);
|
||||
#include "BasicDemo.h"
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "GlutStuff.h"
|
||||
@@ -58,7 +58,7 @@ int main(int argc,char** argv)
|
||||
|
||||
BasicDemo ccdDemo;
|
||||
ccdDemo.initPhysics();
|
||||
ccdDemo.setCameraDistance(50.f);
|
||||
ccdDemo.setCameraDistance(btScalar(50.));
|
||||
|
||||
#ifdef CHECK_MEMORY_LEAKS
|
||||
ccdDemo.exitPhysics();
|
||||
@@ -161,9 +161,9 @@ void BasicDemo::initPhysics()
|
||||
|
||||
//static ground
|
||||
#ifdef USE_GROUND_BOX
|
||||
btCollisionShape* groundShape = new btBoxShape(btVector3(50.f,50.f,50.f));
|
||||
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
|
||||
#else
|
||||
btCollisionShape* groundShape = new btSphereShape(50.f);
|
||||
btCollisionShape* groundShape = new btSphereShape(btScalar(50.));
|
||||
#endif//USE_GROUND_BOX
|
||||
|
||||
m_collisionShapes.push_back(groundShape);
|
||||
@@ -171,10 +171,10 @@ void BasicDemo::initPhysics()
|
||||
btTransform groundTransform;
|
||||
groundTransform.setIdentity();
|
||||
groundTransform.setOrigin(btVector3(0,-50,0));
|
||||
localCreateRigidBody(0.f,groundTransform,groundShape);
|
||||
localCreateRigidBody(btScalar(0.),groundTransform,groundShape);
|
||||
|
||||
//create a few dynamic sphere rigidbodies (re-using the same sphere shape)
|
||||
btCollisionShape* sphereShape = new btSphereShape(1.f);
|
||||
btCollisionShape* sphereShape = new btSphereShape(btScalar(1.));
|
||||
m_collisionShapes.push_back(sphereShape);
|
||||
|
||||
int i;
|
||||
@@ -193,8 +193,8 @@ void BasicDemo::initPhysics()
|
||||
row*2*HALF_EXTENTS+HALF_EXTENTS,0);
|
||||
|
||||
trans.setOrigin(pos);
|
||||
//btRigidBody* body = localCreateRigidBody(1.f,trans,sphereShape);
|
||||
localCreateRigidBody(1.f,trans,sphereShape);
|
||||
//btRigidBody* body = localCreateRigidBody(btScalar(1.),trans,sphereShape);
|
||||
localCreateRigidBody(btScalar(1.),trans,sphereShape);
|
||||
}
|
||||
|
||||
clientResetScene();
|
||||
|
||||
@@ -21,20 +21,24 @@ subject to the following restrictions:
|
||||
void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
{
|
||||
{
|
||||
btVector3 playerStart (0.f, 0.f, 100.f);
|
||||
|
||||
float playstartf[3] = {0,0,100};
|
||||
|
||||
if (bspLoader.findVectorByName(&playerStart[0],"info_player_start"))
|
||||
if (bspLoader.findVectorByName(&playstartf[0],"info_player_start"))
|
||||
{
|
||||
printf("found playerstart\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bspLoader.findVectorByName(&playerStart[0],"info_player_deathmatch"))
|
||||
if (bspLoader.findVectorByName(&playstartf[0],"info_player_deathmatch"))
|
||||
{
|
||||
printf("found deatchmatch start\n");
|
||||
}
|
||||
}
|
||||
|
||||
btVector3 playerStart (playstartf[0],playstartf[1],playstartf[2]);
|
||||
|
||||
|
||||
playerStart[2] += 20.f; //start a bit higher
|
||||
|
||||
playerStart *= scaling;
|
||||
@@ -113,6 +117,7 @@ void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
if ( strcmp( cl, "" ) ) {
|
||||
//its not empty so ...
|
||||
|
||||
/*
|
||||
//lookup the target position for the jumppad:
|
||||
const BSPEntity* targetentity = bspLoader.getEntityByValue( "targetname" , cl );
|
||||
if (targetentity)
|
||||
@@ -122,6 +127,8 @@ void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
cl = bspLoader.getValueForKey(&entity,"model");
|
||||
if ( strcmp( cl, "" ) ) {
|
||||
|
||||
@@ -153,7 +153,7 @@ void customNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher&
|
||||
GLDebugDrawer debugDrawer;
|
||||
|
||||
//experimental jitter damping (1 = no damping, 0 = total damping once motion below threshold)
|
||||
extern float gJitterVelocityDampingFactor;
|
||||
extern btScalar gJitterVelocityDampingFactor;
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@ void CollisionDemo::displayCallback(void) {
|
||||
|
||||
//GL_ShapeDrawer::drawCoordSystem();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
int i;
|
||||
|
||||
// btGjkPairDetector convexConvex(shapePtr[0],shapePtr[1],&sGjkSimplexSolver,0);
|
||||
|
||||
@@ -156,7 +156,7 @@ void CollisionInterfaceDemo::displayCallback(void) {
|
||||
|
||||
//GL_ShapeDrawer::drawCoordSystem();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ void ConcaveDemo::initPhysics()
|
||||
btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(totalTriangles,
|
||||
gIndices,
|
||||
indexStride,
|
||||
totalVerts,(float*) &gVertices[0].x(),vertStride);
|
||||
totalVerts,(btScalar*) &gVertices[0].x(),vertStride);
|
||||
|
||||
btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays);
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void btContinuousConvexCollisionDemo::displayCallback(void) {
|
||||
|
||||
//GL_ShapeDrawer::drawCoordSystem();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
int i;
|
||||
|
||||
/*for (i=0;i<numObjects;i++)
|
||||
|
||||
@@ -70,7 +70,11 @@ static void DrawLine(const btVector3& p0, const btVector3& p1, const btVector3&
|
||||
glColor4f(color.x(), color.y(), color.z(), 1.0f);
|
||||
btVector3 tmp[] = {p0, p1};
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
#ifndef BT_USE_DOUBLE_PRECISION
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(btVector3), &tmp[0].x());
|
||||
#else
|
||||
glVertexPointer(3, GL_DOUBLE, sizeof(btVector3), &tmp[0].x());
|
||||
#endif
|
||||
glDrawArrays(GL_LINES, 0, 2);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -83,7 +87,11 @@ void DrawTriangle(const btVector3& p0, const btVector3& p1, const btVector3& p2,
|
||||
glColor4f(color.x(), color.y(), color.z(), 1.0f);
|
||||
btVector3 tmp[] = {p0, p1, p2};
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
#ifndef BT_USE_DOUBLE_PRECISION
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(btVector3), &tmp[0].x());
|
||||
#else
|
||||
glVertexPointer(3, GL_DOUBLE, sizeof(btVector3), &tmp[0].x());
|
||||
#endif
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
// glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -199,10 +207,13 @@ void MyConvex::Render(bool only_wireframe, const btVector3& wire_color) const
|
||||
const float Scale = 1.0f;
|
||||
glPushMatrix();
|
||||
|
||||
float glmat[16]; //4x4 column major matrix for OpenGL.
|
||||
btScalar glmat[16]; //4x4 column major matrix for OpenGL.
|
||||
mTransform.getOpenGLMatrix(glmat);
|
||||
#ifndef BT_USE_DOUBLE_PRECISION
|
||||
glMultMatrixf(&(glmat[0]));
|
||||
|
||||
#else
|
||||
glMultMatrixd(&(glmat[0]));
|
||||
#endif
|
||||
if(!only_wireframe)
|
||||
{
|
||||
btVector3 color(0.0f, 0.5f, 1.0f);
|
||||
@@ -273,7 +284,7 @@ static float gDepth;
|
||||
{
|
||||
}
|
||||
|
||||
virtual void addContactPoint(const btVector3& normalOnBInWorld, const btVector3& pointInWorld, float depth)
|
||||
virtual void addContactPoint(const btVector3& normalOnBInWorld, const btVector3& pointInWorld, btScalar depth)
|
||||
{
|
||||
gNormal = normalOnBInWorld;
|
||||
gPoint = pointInWorld;
|
||||
@@ -293,8 +304,8 @@ static bool TestEPA(const MyConvex& hull0, const MyConvex& hull1)
|
||||
|
||||
simplexSolver.reset();
|
||||
|
||||
btConvexHullShape convexA((float*)hull0.mVerts, hull0.mNbVerts, sizeof(btVector3));
|
||||
btConvexHullShape convexB((float*)hull1.mVerts, hull1.mNbVerts, sizeof(btVector3));
|
||||
btConvexHullShape convexA((btScalar*)hull0.mVerts, hull0.mNbVerts, sizeof(btVector3));
|
||||
btConvexHullShape convexB((btScalar*)hull1.mVerts, hull1.mNbVerts, sizeof(btVector3));
|
||||
|
||||
static btGjkEpaPenetrationDepthSolver Solver0;
|
||||
static btMinkowskiPenetrationDepthSolver Solver1;
|
||||
|
||||
@@ -139,7 +139,7 @@ void LinearConvexCastDemo::displayCallback(void)
|
||||
|
||||
//GL_ShapeDrawer::drawCoordSystem();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
int i;
|
||||
|
||||
for (i=0;i<numObjects;i++)
|
||||
|
||||
@@ -37,7 +37,7 @@ GLDebugDrawer debugDrawer;
|
||||
|
||||
//***************************THE FAMOUS BUNNY TRIMESH********************************************//
|
||||
|
||||
#define REAL float
|
||||
#define REAL btScalar
|
||||
const int NUM_TRIANGLES =902;
|
||||
const int NUM_VERTICES = 453;
|
||||
const int NUM_INDICES = NUM_TRIANGLES * 3;
|
||||
@@ -1487,7 +1487,7 @@ void ConcaveDemo::renderme()
|
||||
{
|
||||
updateCamera();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
|
||||
if (m_dynamicsWorld)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ subject to the following restrictions:
|
||||
#include "BulletCollision/NarrowPhaseCollision/btConvexCast.h"
|
||||
#include "LinearMath/btTransform.h"
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "GlutStuff.h"
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@@ -48,20 +49,20 @@ struct btDebugCastResult : public btConvexCast::CastResult
|
||||
|
||||
virtual void drawCoordSystem(const btTransform& tr)
|
||||
{
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
tr.getOpenGLMatrix(m);
|
||||
glPushMatrix();
|
||||
glLoadMatrixf(m);
|
||||
btglLoadMatrix(m);
|
||||
glBegin(GL_LINES);
|
||||
glColor3f(1, 0, 0);
|
||||
glVertex3d(0, 0, 0);
|
||||
glVertex3d(1, 0, 0);
|
||||
glColor3f(0, 1, 0);
|
||||
glVertex3d(0, 0, 0);
|
||||
glVertex3d(0, 1, 0);
|
||||
glColor3f(0, 0, 1);
|
||||
glVertex3d(0, 0, 0);
|
||||
glVertex3d(0, 0, 1);
|
||||
btglColor3(1, 0, 0);
|
||||
btglVertex3(0, 0, 0);
|
||||
btglVertex3(1, 0, 0);
|
||||
btglColor3(0, 1, 0);
|
||||
btglVertex3(0, 0, 0);
|
||||
btglVertex3(0, 1, 0);
|
||||
btglColor3(0, 0, 1);
|
||||
btglVertex3(0, 0, 0);
|
||||
btglVertex3(0, 0, 1);
|
||||
glEnd();
|
||||
glPopMatrix();
|
||||
}
|
||||
@@ -69,7 +70,7 @@ struct btDebugCastResult : public btConvexCast::CastResult
|
||||
virtual void DebugDraw(btScalar fraction)
|
||||
{
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
btTransform hitTrans;
|
||||
btTransformUtil::integrateTransform(m_fromTrans,m_linVel,m_angVel,fraction,hitTrans);
|
||||
hitTrans.getOpenGLMatrix(m);
|
||||
|
||||
@@ -708,7 +708,7 @@ void DemoApplication::renderme()
|
||||
{
|
||||
updateCamera();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
|
||||
if (m_dynamicsWorld)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ void GLDebugDrawer::setDebugMode(int debugMode)
|
||||
|
||||
}
|
||||
|
||||
void GLDebugDrawer::drawContactPoint(const btVector3& pointOnB,const btVector3& normalOnB,float distance,int lifeTime,const btVector3& color)
|
||||
void GLDebugDrawer::drawContactPoint(const btVector3& pointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)
|
||||
{
|
||||
if (m_debugMode & btIDebugDraw::DBG_DrawContactPoints)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
|
||||
virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
|
||||
|
||||
virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,float distance,int lifeTime,const btVector3& color);
|
||||
virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color);
|
||||
|
||||
virtual void setDebugMode(int debugMode);
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ subject to the following restrictions:
|
||||
#include <GL/glut.h>
|
||||
#endif
|
||||
|
||||
#include "GlutStuff.h"
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
|
||||
@@ -145,8 +146,8 @@ void OGL_displaylist_clean()
|
||||
|
||||
void OGL_displaylist_register_shape(btCollisionShape * shape)
|
||||
{
|
||||
btVector3 aabbMax(1e30f,1e30f,1e30f);
|
||||
btVector3 aabbMin(-1e30f,-1e30f,-1e30f);
|
||||
btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
|
||||
btVector3 aabbMin(-btScalar(1e30),-btScalar(1e30),-btScalar(1e30));
|
||||
GlDisplaylistDrawcallback drawCallback;
|
||||
TRIMESH_KEY dlist;
|
||||
|
||||
@@ -257,12 +258,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
void GL_ShapeDrawer::drawOpenGL(float* m, const btCollisionShape* shape, const btVector3& color,int debugMode)
|
||||
void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, const btVector3& color,int debugMode)
|
||||
{
|
||||
|
||||
|
||||
glPushMatrix();
|
||||
glMultMatrixf(m);
|
||||
btglMultMatrix(m);
|
||||
|
||||
if (shape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE)
|
||||
{
|
||||
@@ -271,7 +272,7 @@ void GL_ShapeDrawer::drawOpenGL(float* m, const btCollisionShape* shape, const b
|
||||
{
|
||||
btTransform childTrans = compoundShape->getChildTransform(i);
|
||||
const btCollisionShape* colShape = compoundShape->getChildShape(i);
|
||||
float childMat[16];
|
||||
btScalar childMat[16];
|
||||
childTrans.getOpenGLMatrix(childMat);
|
||||
drawOpenGL(childMat,colShape,color,debugMode);
|
||||
}
|
||||
@@ -471,12 +472,12 @@ void GL_ShapeDrawer::drawOpenGL(float* m, const btCollisionShape* shape, const b
|
||||
// if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
|
||||
{
|
||||
btConcaveShape* concaveMesh = (btTriangleMeshShape*) shape;
|
||||
//btVector3 aabbMax(1e30f,1e30f,1e30f);
|
||||
//btVector3 aabbMax(100,100,100);//1e30f,1e30f,1e30f);
|
||||
//btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
|
||||
//btVector3 aabbMax(100,100,100);//btScalar(1e30),btScalar(1e30),btScalar(1e30));
|
||||
|
||||
//todo pass camera, for some culling
|
||||
btVector3 aabbMax(1e30f,1e30f,1e30f);
|
||||
btVector3 aabbMin(-1e30f,-1e30f,-1e30f);
|
||||
btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
|
||||
btVector3 aabbMin(-btScalar(1e30),-btScalar(1e30),-btScalar(1e30));
|
||||
|
||||
GlDrawcallback drawCallback;
|
||||
drawCallback.m_wireframe = (debugMode & btIDebugDraw::DBG_DrawWireframe)!=0;
|
||||
@@ -496,8 +497,8 @@ void GL_ShapeDrawer::drawOpenGL(float* m, const btCollisionShape* shape, const b
|
||||
btConvexTriangleMeshShape* convexMesh = (btConvexTriangleMeshShape*) shape;
|
||||
|
||||
//todo: pass camera for some culling
|
||||
btVector3 aabbMax(1e30f,1e30f,1e30f);
|
||||
btVector3 aabbMin(-1e30f,-1e30f,-1e30f);
|
||||
btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
|
||||
btVector3 aabbMin(-btScalar(1e30),-btScalar(1e30),-btScalar(1e30));
|
||||
TriangleGlDrawcallback drawCallback;
|
||||
convexMesh->getStridingMesh()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class GL_ShapeDrawer
|
||||
{
|
||||
public:
|
||||
|
||||
static void drawOpenGL(float* m, const btCollisionShape* shape, const btVector3& color,int debugMode);
|
||||
static void drawOpenGL(btScalar* m, const btCollisionShape* shape, const btVector3& color,int debugMode);
|
||||
static void drawCoordSystem();
|
||||
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ subject to the following restrictions:
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include "GlutStuff.h"
|
||||
#include "LinearMath/btTransform.h"
|
||||
|
||||
GL_Simplex1to4::GL_Simplex1to4()
|
||||
@@ -36,7 +37,7 @@ GL_Simplex1to4::GL_Simplex1to4()
|
||||
///
|
||||
/// Debugging method calcClosest calculates the closest point to the origin, using m_simplexSolver
|
||||
///
|
||||
void GL_Simplex1to4::calcClosest(float* m)
|
||||
void GL_Simplex1to4::calcClosest(btScalar* m)
|
||||
{
|
||||
btTransform tr;
|
||||
tr.setFromOpenGLMatrix(m);
|
||||
@@ -62,9 +63,9 @@ void GL_Simplex1to4::calcClosest(float* m)
|
||||
//draw v?
|
||||
glDisable(GL_LIGHTING);
|
||||
glBegin(GL_LINES);
|
||||
glColor3f(1.f, 0.f, 0.f);
|
||||
glVertex3f(0.f, 0.f, 0.f);
|
||||
glVertex3f(v.x(),v.y(),v.z());
|
||||
btglColor3(1.f, 0.f, 0.f);
|
||||
btglVertex3(0.f, 0.f, 0.f);
|
||||
btglVertex3(v.x(),v.y(),v.z());
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
@@ -29,7 +29,7 @@ class GL_Simplex1to4 : public btBU_Simplex1to4
|
||||
|
||||
GL_Simplex1to4();
|
||||
|
||||
void calcClosest(float* m);
|
||||
void calcClosest(btScalar* m);
|
||||
|
||||
void setSimplexSolver(btSimplexSolverInterface* simplexSolver) {
|
||||
m_simplexSolver = simplexSolver;
|
||||
|
||||
@@ -19,4 +19,16 @@ class DemoApplication;
|
||||
|
||||
int glutmain(int argc, char **argv,int width,int height,const char* title,DemoApplication* demoApp);
|
||||
|
||||
#if defined(BT_USE_DOUBLE_PRECISION)
|
||||
#define btglLoadMatrix glLoadMatrixd
|
||||
#define btglMultMatrix glMultMatrixd
|
||||
#define btglColor3 glColor3d
|
||||
#define btglVertex3 glVertex3d
|
||||
#else
|
||||
#define btglLoadMatrix glLoadMatrixf
|
||||
#define btglMultMatrix glMultMatrixf
|
||||
#define btglColor3 glColor3f
|
||||
#define btglVertex3 glVertex3d
|
||||
#endif
|
||||
|
||||
#endif //GLUT_STUFF_H
|
||||
|
||||
@@ -73,7 +73,7 @@ void SimplexDemo::displayCallback()
|
||||
|
||||
GL_ShapeDrawer::drawCoordSystem();
|
||||
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
int i;
|
||||
|
||||
for (i=0;i<numObjects;i++)
|
||||
|
||||
@@ -183,7 +183,7 @@ const float TRIANGLE_SIZE=20.f;
|
||||
btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(totalTriangles,
|
||||
gIndices,
|
||||
indexStride,
|
||||
totalVerts,(float*) &gVertices[0].x(),vertStride);
|
||||
totalVerts,(btScalar*) &gVertices[0].x(),vertStride);
|
||||
|
||||
groundShape = new btBvhTriangleMeshShape(indexVertexArrays);
|
||||
|
||||
@@ -297,7 +297,7 @@ void VehicleDemo::renderme()
|
||||
updateCamera();
|
||||
|
||||
debugDrawer.setDebugMode(getDebugMode());
|
||||
float m[16];
|
||||
btScalar m[16];
|
||||
int i;
|
||||
|
||||
btCylinderShapeX wheelShape(btVector3(wheelWidth,wheelRadius,wheelRadius));
|
||||
|
||||
Reference in New Issue
Block a user