fixes in serialization (don't serialize shapes multiple times), hull shape issue,

fix InternalEdgeDemo compilation using GLUT
This commit is contained in:
erwin.coumans
2010-01-30 06:55:39 +00:00
parent d5f5ddf2f1
commit 01b66a6799
7 changed files with 43 additions and 13 deletions

View File

@@ -190,7 +190,7 @@ void InternalEdgeDemo::initPhysics()
//gVertices[1].setY(21.1);
//gVertices[1].setY(121.1);
gVertices[1].setY(.1);
gVertices[1].setY(.1f);
#ifdef ROTATE_GROUND
//gVertices[1].setY(-1.1);
@@ -353,7 +353,7 @@ void InternalEdgeDemo::initPhysics()
m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_broadphase,m_solver,m_collisionConfiguration);
m_dynamicsWorld->getSolverInfo().m_splitImpulse = true;
m_dynamicsWorld->getSolverInfo().m_splitImpulsePenetrationThreshold = 1e30f;
m_dynamicsWorld->getSolverInfo().m_maxErrorReduction = 1e30;
m_dynamicsWorld->getSolverInfo().m_maxErrorReduction = 1e30f;
m_dynamicsWorld->getSolverInfo().m_erp =1.f;
m_dynamicsWorld->getSolverInfo().m_erp2 = 1.f;
@@ -375,7 +375,7 @@ void InternalEdgeDemo::initPhysics()
{
for (int i=0;i<1;i++)
{
startTransform.setOrigin(btVector3(-10+i*3,1+i*0.1,-1.3));
startTransform.setOrigin(btVector3(-10.f+i*3.f,1.f+btScalar(i)*0.1f,-1.3f));
btRigidBody* body = localCreateRigidBody(100, startTransform,colShape);
body->setActivationState(DISABLE_DEACTIVATION);
body->setLinearVelocity(btVector3(0,0,-1));
@@ -485,7 +485,7 @@ void InternalEdgeDemo::clientMoveAndDisplay()
renderme();
glFlush();
glutSwapBuffers();
swapBuffers();
}

View File

@@ -15,7 +15,14 @@ subject to the following restrictions:
#ifndef CONCAVE_DEMO_H
#define CONCAVE_DEMO_H
#ifdef _WINDOWS
#include "Win32DemoApplication.h"
#define PlatformDemoApplication Win32DemoApplication
#else
#include "GlutDemoApplication.h"
#define PlatformDemoApplication GlutDemoApplication
#endif
#include "LinearMath/btAlignedObjectArray.h"
class btBroadphaseInterface;
@@ -29,7 +36,7 @@ class btTriangleIndexVertexArray;
///InternalEdgeDemo shows usage of static concave triangle meshes
///It also shows per-triangle material (friction/restitution) through CustomMaterialCombinerCallback
class InternalEdgeDemo : public GlutDemoApplication
class InternalEdgeDemo : public PlatformDemoApplication
{
//keep the collision shapes, for deletion/cleanup

View File

@@ -19,7 +19,7 @@ subject to the following restrictions:
///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo
DemoApplication* createDemo()
{
return new InternalEdgeDemo.cpp();
return new InternalEdgeDemo();
}
#endif