made 'calculateLocalInertia' const, thanks to cgripeos, see http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1514

- applied a large patch to remove warnings
Thanks to Enrico, see http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1568
- removed SSE includes, added #incude <string.h> for memset in Extras/quickstep, thanks Eternl Knight
- disabled 16-byte alignement on btQuadWord class, it causes problems under PS3 Linux. Need to check out why.
This commit is contained in:
ejcoumans
2007-10-13 23:41:37 +00:00
parent 0aff20fc94
commit ea3dfb4ca3
66 changed files with 149 additions and 146 deletions

View File

@@ -96,7 +96,7 @@ int main(int argc,char** argv)
BspDemo* bspDemo = new BspDemo();
char* bspfilename = "BspDemo.bsp";
const char* bspfilename = "BspDemo.bsp";
printf("argc=%i\n",argc);
{
@@ -113,7 +113,8 @@ int main(int argc,char** argv)
bspfilename = argv[1];
}
bspDemo->initPhysics(bspfilename);
// Enrico: TODO: Should change parameter type of initPhysics() to std::string or at least const char *
bspDemo->initPhysics((char*)bspfilename);
bspDemo->setCameraDistance(22.f);

View File

@@ -340,7 +340,6 @@ drawDinosaur(void)
{
plReal matrix[16];
plVector3 dinoWorldPos;
glPushMatrix();
/* Translate the dinosaur to be at (0,8,0). */
@@ -839,7 +838,7 @@ main(int argc, char **argv)
plVector3 dinoPos;
plQuaternion childOrn,dinoOrient;
void* user_data;
void* user_data=NULL;
physicsSdk = plNewBulletSdk();
dynamicsWorld = plCreateDynamicsWorld(physicsSdk);

View File

@@ -141,7 +141,7 @@ int main(int argc,char** argv)
/// Import Collada 1.4 Physics objects
/// also can pass filename in as argument
char* filename = "jenga.dae";
const char* filename = "jenga.dae";
printf("argc=%i\n",argc);
{
for (int i=0;i<argc;i++)

View File

@@ -228,7 +228,6 @@ void ConcaveDemo::initPhysics()
int buffersize = size+btOptimizedBvh::getAlignmentSerializationPadding();
void* buffer = btAlignedAlloc(buffersize,16);
//memset(buffer,0xcc,size);
int read = fread(buffer,1,size,file);
fclose(file);
bool swapEndian = false;

View File

@@ -67,7 +67,7 @@ GLDebugDrawer debugDrawer;
int main(int argc,char** argv)
{
char* filename = "file.obj";
const char* filename = "file.obj";
ConvexDecompositionDemo* convexDecompDemo = new ConvexDecompositionDemo();

View File

@@ -675,8 +675,8 @@ static void RenderCallback()
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
float RefDMin;
btVector3 RefSep;
btVector3 RefSep(btScalar(0.), btScalar(0.), btScalar(0.));
float RefDMin=0.f;
bool RefResult = false;
if(gRefMode)
RefResult = ReferenceCode(gConvex0, gConvex1, RefDMin, RefSep);

View File

@@ -39,7 +39,6 @@ SubInclude TOP Demos BspDemo ;
SubInclude TOP Demos BasicDemo ;
SubInclude TOP Demos ConvexDecompositionDemo ;
SubInclude TOP Demos ColladaDemo ;
SubInclude TOP Demos BspDemo ;
SubInclude TOP Demos VehicleDemo ;
SubInclude TOP Demos CollisionDemo ;
SubInclude TOP Demos CollisionInterfaceDemo ;
@@ -54,5 +53,4 @@ SubInclude TOP Demos GjkConvexCastDemo ;
SubInclude TOP Demos Raytracer ;
SubInclude TOP Demos SimplexDemo ;
SubInclude TOP Demos DoublePrecisionDemo ;
SubInclude TOP Demos RagdollDemo ;

View File

@@ -321,10 +321,10 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
const btConvexShape* convexShape = scalingShape->getChildShape();
float scalingFactor = (float)scalingShape->getUniformScalingFactor();
{
btScalar tmpScaling[4][4]={scalingFactor,0,0,0,
0,scalingFactor,0,0,
0,0,scalingFactor,0,
0,0,0,1};
btScalar tmpScaling[4][4]={{scalingFactor,0,0,0},
{0,scalingFactor,0,0},
{0,0,scalingFactor,0},
{0,0,0,1}};
drawOpenGL( (btScalar*)tmpScaling,convexShape,color,debugMode);
}

View File

@@ -28,10 +28,19 @@ Written by: Marten Svanfeldt
GLDebugDrawer debugDrawer;
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.785398163397448309616
// Enrico: Shouldn't these three variables be real constants and not defines?
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923
#endif
#ifndef M_PI_4
#define M_PI_4 0.785398163397448309616
#endif
class RagDoll
{