add option to terminate PGS constraint solvers based on a least square residual threshold
(for example solverInfo().m_leastSquaresResidualThreshold = 1e-7 and use large m_numSolverIterations disable sphere-sphere contact cache, it is buggy (some contact point stay in the cache, when sphere penetrates more than total margins) tweak some gpu demo settings
This commit is contained in:
@@ -80,7 +80,18 @@ m_window(0)
|
||||
m_window = helper->getAppInterface()->m_window;
|
||||
|
||||
m_data = new GpuRigidBodyDemoInternalData;
|
||||
m_data->m_guiHelper = helper;
|
||||
}
|
||||
|
||||
void GpuRigidBodyDemo::resetCamera()
|
||||
{
|
||||
float dist = 114;
|
||||
float pitch = 52;
|
||||
float yaw = 35;
|
||||
float targetPos[3]={0,0,0};
|
||||
m_data->m_guiHelper->resetCamera(dist,pitch,yaw,targetPos[0],targetPos[1],targetPos[2]);
|
||||
}
|
||||
|
||||
GpuRigidBodyDemo::~GpuRigidBodyDemo()
|
||||
{
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ public:
|
||||
|
||||
virtual void renderScene();
|
||||
|
||||
|
||||
void resetCamera();
|
||||
|
||||
virtual void stepSimulation(float deltaTime);
|
||||
|
||||
//for picking
|
||||
|
||||
@@ -32,6 +32,7 @@ struct GpuRigidBodyDemoInternalData
|
||||
int m_pickGraphicsShapeIndex;
|
||||
int m_pickGraphicsShapeInstance;
|
||||
b3Config m_config;
|
||||
GUIHelperInterface* m_guiHelper;
|
||||
|
||||
GpuRigidBodyDemoInternalData()
|
||||
:m_instancePosOrnColor(0),
|
||||
@@ -45,7 +46,8 @@ struct GpuRigidBodyDemoInternalData
|
||||
m_pickGraphicsShapeInstance(-1),
|
||||
m_pickBody(-1),
|
||||
m_altPressed(0),
|
||||
m_controlPressed(0)
|
||||
m_controlPressed(0),
|
||||
m_guiHelper(0)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user