address PR comments
This commit is contained in:
@@ -109,6 +109,7 @@
|
|||||||
#include "BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h"
|
#include "BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SKIP_DEFORMABE_BODY 1
|
||||||
|
|
||||||
int gInternalSimFlags = 0;
|
int gInternalSimFlags = 0;
|
||||||
bool gResetSimulation = 0;
|
bool gResetSimulation = 0;
|
||||||
@@ -1622,7 +1623,7 @@ struct PhysicsServerCommandProcessorInternalData
|
|||||||
btHashedOverlappingPairCache* m_pairCache;
|
btHashedOverlappingPairCache* m_pairCache;
|
||||||
btBroadphaseInterface* m_broadphase;
|
btBroadphaseInterface* m_broadphase;
|
||||||
btCollisionDispatcher* m_dispatcher;
|
btCollisionDispatcher* m_dispatcher;
|
||||||
#ifdef SKIP_DEFORMABLE_BODY
|
#if defined (SKIP_DEFORMABLE_BODY) || defined(SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||||
btMultiBodyConstraintSolver* m_solver;
|
btMultiBodyConstraintSolver* m_solver;
|
||||||
#else
|
#else
|
||||||
btDeformableMultiBodyConstraintSolver* m_solver;
|
btDeformableMultiBodyConstraintSolver* m_solver;
|
||||||
@@ -2797,9 +2798,7 @@ void PhysicsServerCommandProcessor::deleteDynamicsWorld()
|
|||||||
for (i = m_data->m_dynamicsWorld->getSoftBodyArray().size() - 1; i >= 0; i--)
|
for (i = m_data->m_dynamicsWorld->getSoftBodyArray().size() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
btSoftBody* sb = m_data->m_dynamicsWorld->getSoftBodyArray()[i];
|
btSoftBody* sb = m_data->m_dynamicsWorld->getSoftBodyArray()[i];
|
||||||
#ifdef SKIP_DEFORMABLE_BODY
|
|
||||||
m_data->m_dynamicsWorld->removeSoftBody(sb);
|
m_data->m_dynamicsWorld->removeSoftBody(sb);
|
||||||
#endif
|
|
||||||
delete sb;
|
delete sb;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2870,7 +2869,7 @@ void PhysicsServerCommandProcessor::deleteDynamicsWorld()
|
|||||||
delete m_data->m_remoteDebugDrawer;
|
delete m_data->m_remoteDebugDrawer;
|
||||||
m_data->m_remoteDebugDrawer = 0;
|
m_data->m_remoteDebugDrawer = 0;
|
||||||
|
|
||||||
#ifndef SKIP_DEFORMABLE_BODY
|
#if !defined (SKIP_DEFORMABLE_BODY) && !defined(SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||||
delete m_data->m_deformablebodySolver;
|
delete m_data->m_deformablebodySolver;
|
||||||
m_data->m_deformablebodySolver = 0;
|
m_data->m_deformablebodySolver = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -8108,12 +8107,9 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar
|
|||||||
if (psb != NULL)
|
if (psb != NULL)
|
||||||
{
|
{
|
||||||
#ifndef SKIP_DEFORMABLE_BODY
|
#ifndef SKIP_DEFORMABLE_BODY
|
||||||
btVector3 gravity(0,0,0);
|
btVector3 gravity = m_data->m_dynamicsWorld->getGravity();
|
||||||
if (clientCmd.m_updateFlags & LOAD_SOFT_BODY_ADD_GRAVITY_FORCE)
|
if (clientCmd.m_updateFlags & LOAD_SOFT_BODY_ADD_GRAVITY_FORCE)
|
||||||
{
|
{
|
||||||
gravity[0] = loadSoftBodyArgs.m_gravity[0];
|
|
||||||
gravity[1] = loadSoftBodyArgs.m_gravity[1];
|
|
||||||
gravity[2] = loadSoftBodyArgs.m_gravity[2];
|
|
||||||
m_data->m_dynamicsWorld->addForce(psb, new btDeformableGravityForce(gravity));
|
m_data->m_dynamicsWorld->addForce(psb, new btDeformableGravityForce(gravity));
|
||||||
}
|
}
|
||||||
btScalar collision_hardness = 1;
|
btScalar collision_hardness = 1;
|
||||||
|
|||||||
@@ -523,7 +523,6 @@ struct LoadSoftBodyArgs
|
|||||||
double m_springDampingStiffness;
|
double m_springDampingStiffness;
|
||||||
double m_corotatedMu;
|
double m_corotatedMu;
|
||||||
double m_corotatedLambda;
|
double m_corotatedLambda;
|
||||||
double m_gravity[3];
|
|
||||||
bool m_useBendingSprings;
|
bool m_useBendingSprings;
|
||||||
double m_collisionHardness;
|
double m_collisionHardness;
|
||||||
double m_frictionCoeff;
|
double m_frictionCoeff;
|
||||||
|
|||||||
Reference in New Issue
Block a user