Added btUniformScalingShape (including support for debug rendering etc)

This allows to re-use a convex shape, while each instance can re-scale it (with a uniform scalar factor)
This commit is contained in:
ejcoumans
2007-07-28 19:20:45 +00:00
parent 0df4cedc3e
commit 177b6f5ce2
6 changed files with 153 additions and 2 deletions

View File

@@ -21,7 +21,13 @@ Written by: Marten Svanfeldt
#include "GlutStuff.h"
#include "GL_ShapeDrawer.h"
#include "LinearMath/btIDebugDraw.h"
#include "GLDebugDrawer.h"
#include "RagdollDemo.h"
GLDebugDrawer debugDrawer;
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.785398163397448309616
@@ -311,6 +317,8 @@ void RagdollDemo::initPhysics()
m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver);
m_dynamicsWorld->setDebugDrawer(&debugDrawer);
// Setup a big ground box
{
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(200.),btScalar(10.),btScalar(200.)));