get rid of auto
This commit is contained in:
@@ -47,7 +47,7 @@ void btDeformableBackwardEulerObjective::multiply(const TVStack& x, TVStack& b)
|
|||||||
btSoftBody* psb = m_softBodies[i];
|
btSoftBody* psb = m_softBodies[i];
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
{
|
{
|
||||||
const auto& node = psb->m_nodes[j];
|
const btSoftBody::Node& node = psb->m_nodes[j];
|
||||||
b[counter] += (node.m_im == 0) ? btVector3(0,0,0) : x[counter] / node.m_im;
|
b[counter] += (node.m_im == 0) ? btVector3(0,0,0) : x[counter] / node.m_im;
|
||||||
++counter;
|
++counter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "btDeformableContactProjection.h"
|
#include "btDeformableContactProjection.h"
|
||||||
#include "btDeformableRigidDynamicsWorld.h"
|
#include "btDeformableRigidDynamicsWorld.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <math.h>
|
||||||
static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol,
|
static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol,
|
||||||
btMultiBodyJacobianData& jacobianData,
|
btMultiBodyJacobianData& jacobianData,
|
||||||
const btVector3& contact_point,
|
const btVector3& contact_point,
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ public:
|
|||||||
const btSoftBody* psb = m_softBodies[i];
|
const btSoftBody* psb = m_softBodies[i];
|
||||||
for (int j = 0; j < psb->m_links.size(); ++j)
|
for (int j = 0; j < psb->m_links.size(); ++j)
|
||||||
{
|
{
|
||||||
const auto& link = psb->m_links[j];
|
const btSoftBody::Link& link = psb->m_links[j];
|
||||||
const auto node1 = link.m_n[0];
|
btSoftBody::Node* node1 = link.m_n[0];
|
||||||
const auto node2 = link.m_n[1];
|
btSoftBody::Node* node2 = link.m_n[1];
|
||||||
size_t id1 = m_indices->at(node1);
|
size_t id1 = m_indices->at(node1);
|
||||||
size_t id2 = m_indices->at(node2);
|
size_t id2 = m_indices->at(node2);
|
||||||
|
|
||||||
@@ -62,9 +62,9 @@ public:
|
|||||||
const btSoftBody* psb = m_softBodies[i];
|
const btSoftBody* psb = m_softBodies[i];
|
||||||
for (int j = 0; j < psb->m_links.size(); ++j)
|
for (int j = 0; j < psb->m_links.size(); ++j)
|
||||||
{
|
{
|
||||||
const auto& link = psb->m_links[j];
|
const btSoftBody::Link& link = psb->m_links[j];
|
||||||
const auto node1 = link.m_n[0];
|
btSoftBody::Node* node1 = link.m_n[0];
|
||||||
const auto node2 = link.m_n[1];
|
btSoftBody::Node* node2 = link.m_n[1];
|
||||||
btScalar kLST = link.Feature::m_material->m_kLST;
|
btScalar kLST = link.Feature::m_material->m_kLST;
|
||||||
btScalar r = link.m_rl;
|
btScalar r = link.m_rl;
|
||||||
size_t id1 = m_indices->at(node1);
|
size_t id1 = m_indices->at(node1);
|
||||||
@@ -89,9 +89,9 @@ public:
|
|||||||
const btSoftBody* psb = m_softBodies[i];
|
const btSoftBody* psb = m_softBodies[i];
|
||||||
for (int j = 0; j < psb->m_links.size(); ++j)
|
for (int j = 0; j < psb->m_links.size(); ++j)
|
||||||
{
|
{
|
||||||
const auto& link = psb->m_links[j];
|
const btSoftBody::Link& link = psb->m_links[j];
|
||||||
const auto node1 = link.m_n[0];
|
btSoftBody::Node* node1 = link.m_n[0];
|
||||||
const auto node2 = link.m_n[1];
|
btSoftBody::Node* node2 = link.m_n[1];
|
||||||
btScalar k_damp = psb->m_dampingCoefficient;
|
btScalar k_damp = psb->m_dampingCoefficient;
|
||||||
size_t id1 = m_indices->at(node1);
|
size_t id1 = m_indices->at(node1);
|
||||||
size_t id2 = m_indices->at(node2);
|
size_t id2 = m_indices->at(node2);
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ void btDeformableRigidDynamicsWorld::integrateTransforms(btScalar dt)
|
|||||||
btSoftBody* psb = m_softBodies[i];
|
btSoftBody* psb = m_softBodies[i];
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
{
|
{
|
||||||
auto& node = psb->m_nodes[j];
|
btSoftBody::Node& node = psb->m_nodes[j];
|
||||||
node.m_x = node.m_q + dt * node.m_v;
|
node.m_x = node.m_q + dt * node.m_v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ subject to the following restrictions:
|
|||||||
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
|
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
|
||||||
#include "BulletDynamics/Featherstone/btMultiBodyConstraint.h"
|
#include "BulletDynamics/Featherstone/btMultiBodyConstraint.h"
|
||||||
#include <string.h> //for memset
|
#include <string.h> //for memset
|
||||||
|
#include <math.h>
|
||||||
static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol,
|
static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol,
|
||||||
btMultiBodyJacobianData& jacobianData,
|
btMultiBodyJacobianData& jacobianData,
|
||||||
const btVector3& contact_point,
|
const btVector3& contact_point,
|
||||||
@@ -954,7 +955,7 @@ struct btSoftColliders
|
|||||||
{
|
{
|
||||||
// resolve contact at x_n
|
// resolve contact at x_n
|
||||||
psb->checkContact(m_colObj1Wrap, n.m_q, m, c.m_cti, /*predicted = */ false);
|
psb->checkContact(m_colObj1Wrap, n.m_q, m, c.m_cti, /*predicted = */ false);
|
||||||
auto& cti = c.m_cti;
|
btSoftBody::sCti& cti = c.m_cti;
|
||||||
c.m_node = &n;
|
c.m_node = &n;
|
||||||
const btScalar fc = psb->m_cfg.kDF * m_colObj1Wrap->getCollisionObject()->getFriction();
|
const btScalar fc = psb->m_cfg.kDF * m_colObj1Wrap->getCollisionObject()->getFriction();
|
||||||
c.m_c2 = ima * psb->m_sst.sdt;
|
c.m_c2 = ima * psb->m_sst.sdt;
|
||||||
|
|||||||
Reference in New Issue
Block a user