diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..2e6a9f5d6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,44 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "CMake Debug", + "type": "cppdbg", + "request": "launch", + // "program": "${command:cmake.launchTargetPath}", + "program": "${workspaceFolder}/build/examples/ExampleBrowser/App_ExampleBrowser", + "args": ["--start_demo_name=BasicRD"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/build/examples/ExampleBrowser", + "environment": [ + { + // add the directory where our target was built to the PATHs + // it gets resolved by CMake Tools: + "name": "PATH", + "value": "$PATH:${command:cmake.launchTargetDirectory}" + } + ], + "externalConsole": false, + "MIMode": "lldb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "CodeLLDB", + "type": "lldb", + "request": "launch", + "stopOnEntry": true, + "cwd": "${workspaceFolder}/build/examples/ExampleBrowser", + "program": "${workspaceFolder}/build/examples/ExampleBrowser/App_ExampleBrowser", + "args": ["--start_demo_name=BasicRD"], + } + ] +} \ No newline at end of file diff --git a/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp b/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp index 19f868bda..89542daff 100644 --- a/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp +++ b/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp @@ -193,7 +193,6 @@ void btDeformableBackwardEulerObjective::applyForce(TVStack& force, bool setZero static bool apply_impulse = true; if (psb->m_reducedModel && apply_impulse && sim_time > 1) { - sim_time += m_dt; apply_impulse = false; btScalar f_imp = psb->m_nodes[i].m_im * (target_vel - psb->m_nodes[0].m_v[1]) / m_dt; diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h index 19106f719..f5842995d 100644 --- a/src/BulletSoftBody/btSoftBody.h +++ b/src/BulletSoftBody/btSoftBody.h @@ -862,11 +862,8 @@ public: btAlignedObjectArray m_x0; // Rest position btAlignedObjectArray m_eigenvalues; // eigenvalues of the reduce deformable model tDenseMatrix m_modes; // modes of the reduced deformable model. Each inner array is a mode, outer array size = n_modes - tDenseMatrix m_KrDense; // reduced stiffness matrix (dense) - tDenseMatrix m_MrDense; // reduced mass matrix (dense) btAlignedObjectArray m_Kr; // reduced stiffness matrix btAlignedObjectArray m_Mr; // reduced mass matrix //TODO: do we need this? - btAlignedObjectArray m_M; // full mass matrix //TODO: maybe don't need this? // // Api //