add profiling and code clean up

This commit is contained in:
Xuchen Han
2019-08-05 16:49:04 -07:00
parent 02d3a9469f
commit 73f5eb6a8f
8 changed files with 27 additions and 20 deletions

View File

@@ -14,6 +14,7 @@
#include <stdio.h>
#include <limits>
#include "btDeformableBodySolver.h"
#include "LinearMath/btQuickprof.h"
btDeformableBodySolver::btDeformableBodySolver()
: m_numNodes(0)
@@ -29,6 +30,7 @@ btDeformableBodySolver::~btDeformableBodySolver()
void btDeformableBodySolver::solveConstraints(float solverdt)
{
BT_PROFILE("solveConstraints");
m_objective->setDt(solverdt);
// add constraints to the solver
@@ -70,6 +72,7 @@ void btDeformableBodySolver::reinitialize(const btAlignedObjectArray<btSoftBody
void btDeformableBodySolver::setConstraints()
{
BT_PROFILE("setConstraint");
m_objective->setConstraints();
}