mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-17 15:54:29 +00:00
clean up the damping codes
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
// static btScalar E = 50;
|
||||
// static btScalar nu = 0.3;
|
||||
static btScalar damping_alpha = 0.0;
|
||||
static btScalar damping_beta = 0.0;
|
||||
static btScalar damping_beta = 0.001;
|
||||
static btScalar COLLIDING_VELOCITY = 4;
|
||||
static int start_mode = 6;
|
||||
static int num_modes = 20;
|
||||
@@ -75,10 +75,11 @@ public:
|
||||
|
||||
void Ctor_RbUpStack()
|
||||
{
|
||||
float mass = 28;
|
||||
// float mass = 8;
|
||||
// float mass = 28;
|
||||
float mass = 8;
|
||||
|
||||
btCollisionShape* shape = new btBoxShape(btVector3(0.5, 0.5, 0.5));
|
||||
// btCollisionShape* shape = new btBoxShape(btVector3(0.5, 0.5, 0.5));
|
||||
btCollisionShape* shape = new btBoxShape(btVector3(1, 1, 1));
|
||||
btVector3 localInertia(0, 0, 0);
|
||||
if (mass != 0.f)
|
||||
shape->calculateLocalInertia(mass, localInertia);
|
||||
@@ -205,7 +206,7 @@ void ReducedCollide::initPhysics()
|
||||
|
||||
// create volumetric reduced deformable body
|
||||
{
|
||||
btReducedSoftBody* rsb = btReducedSoftBodyHelpers::createReducedCube(getDeformableDynamicsWorld()->getWorldInfo(), start_mode, num_modes);
|
||||
btReducedSoftBody* rsb = btReducedSoftBodyHelpers::createReducedBeam(getDeformableDynamicsWorld()->getWorldInfo(), start_mode, num_modes);
|
||||
|
||||
getDeformableDynamicsWorld()->addSoftBody(rsb);
|
||||
rsb->getCollisionShape()->setMargin(0.1);
|
||||
|
||||
Reference in New Issue
Block a user