remove Cooper implicit (it was just for comparison, it is buggy)

add btMatrix3x3::solve33, thanks to Erin Catto, and added safety against division by zero
This commit is contained in:
Erwin Coumans
2015-03-25 19:33:02 -07:00
parent 2ddd8f78c2
commit 9931dd9684
5 changed files with 40 additions and 114 deletions

View File

@@ -1,19 +1,17 @@
#include "GyroscopicSetup.h"
static int gyroflags[5] = {
static int gyroflags[4] = {
0,//none, no gyroscopic term
BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT,
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_EWERT,
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_CATTO,
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_COOPER,
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_CATTO
};
static const char* gyroNames[5] = {
static const char* gyroNames[4] = {
"No Coriolis",
"Explicit",
"Ewert",
"Catto",
"Cooper",
"Implicit",
"Local Implicit"
};
@@ -25,16 +23,15 @@ void GyroscopicSetup::initPhysics(GraphicsPhysicsBridge& gfxBridge)
gfxBridge.createPhysicsDebugDrawer(m_dynamicsWorld);
btVector3 positions[5] = {
btVector3 positions[4] = {
btVector3( -10, 8,4),
btVector3( -5, 8,4),
btVector3( 0, 8,4),
btVector3( 5, 8,4),
btVector3( 10, 8,4),
};
for (int i = 0; i<5; i++)
for (int i = 0; i<4; i++)
{
btCylinderShapeZ* pin = new btCylinderShapeZ(btVector3(0.1,0.1, 0.2));
btBoxShape* box = new btBoxShape(btVector3(1,0.1,0.1));