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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user