diff options
author | Xuchen Han <xuchenhan@xuchenhan-macbookpro.roam.corp.google.com> | 2019-08-02 15:19:37 -0700 |
---|---|---|
committer | Xuchen Han <xuchenhan@xuchenhan-macbookpro.roam.corp.google.com> | 2019-08-02 15:19:37 -0700 |
commit | f624b60c198ca4f39f349ece1230ba5ce60ee7e6 (patch) | |
tree | e590e955a7f531145d8c2885a53aac46038a2759 | |
parent | 753b2d9f156bfa7fcf35be0da3c3fbc0b9c85ee3 (diff) | |
download | bullet3-f624b60c198ca4f39f349ece1230ba5ce60ee7e6.tar.gz |
get rid of auto
5 files changed, 14 insertions, 12 deletions
diff --git a/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp b/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp index 7b084af0e..a9b77e368 100644 --- a/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp +++ b/src/BulletSoftBody/btDeformableBackwardEulerObjective.cpp @@ -47,7 +47,7 @@ void btDeformableBackwardEulerObjective::multiply(const TVStack& x, TVStack& b) btSoftBody* psb = m_softBodies[i]; 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; ++counter; } diff --git a/src/BulletSoftBody/btDeformableContactProjection.cpp b/src/BulletSoftBody/btDeformableContactProjection.cpp index 734fbb451..4ae07290c 100644 --- a/src/BulletSoftBody/btDeformableContactProjection.cpp +++ b/src/BulletSoftBody/btDeformableContactProjection.cpp @@ -8,6 +8,7 @@ #include "btDeformableContactProjection.h" #include "btDeformableRigidDynamicsWorld.h" #include <algorithm> +#include <math.h> static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol, btMultiBodyJacobianData& jacobianData, const btVector3& contact_point, diff --git a/src/BulletSoftBody/btDeformableMassSpringForce.h b/src/BulletSoftBody/btDeformableMassSpringForce.h index c9fca134c..549985321 100644 --- a/src/BulletSoftBody/btDeformableMassSpringForce.h +++ b/src/BulletSoftBody/btDeformableMassSpringForce.h @@ -37,9 +37,9 @@ public: const btSoftBody* psb = m_softBodies[i]; for (int j = 0; j < psb->m_links.size(); ++j) { - const auto& link = psb->m_links[j]; - const auto node1 = link.m_n[0]; - const auto node2 = link.m_n[1]; + const btSoftBody::Link& link = psb->m_links[j]; + btSoftBody::Node* node1 = link.m_n[0]; + btSoftBody::Node* node2 = link.m_n[1]; size_t id1 = m_indices->at(node1); size_t id2 = m_indices->at(node2); @@ -62,9 +62,9 @@ public: const btSoftBody* psb = m_softBodies[i]; for (int j = 0; j < psb->m_links.size(); ++j) { - const auto& link = psb->m_links[j]; - const auto node1 = link.m_n[0]; - const auto node2 = link.m_n[1]; + const btSoftBody::Link& link = psb->m_links[j]; + btSoftBody::Node* node1 = link.m_n[0]; + btSoftBody::Node* node2 = link.m_n[1]; btScalar kLST = link.Feature::m_material->m_kLST; btScalar r = link.m_rl; size_t id1 = m_indices->at(node1); @@ -89,9 +89,9 @@ public: const btSoftBody* psb = m_softBodies[i]; for (int j = 0; j < psb->m_links.size(); ++j) { - const auto& link = psb->m_links[j]; - const auto node1 = link.m_n[0]; - const auto node2 = link.m_n[1]; + const btSoftBody::Link& link = psb->m_links[j]; + btSoftBody::Node* node1 = link.m_n[0]; + btSoftBody::Node* node2 = link.m_n[1]; btScalar k_damp = psb->m_dampingCoefficient; size_t id1 = m_indices->at(node1); size_t id2 = m_indices->at(node2); diff --git a/src/BulletSoftBody/btDeformableRigidDynamicsWorld.cpp b/src/BulletSoftBody/btDeformableRigidDynamicsWorld.cpp index 0b8807366..78c5f24a9 100644 --- a/src/BulletSoftBody/btDeformableRigidDynamicsWorld.cpp +++ b/src/BulletSoftBody/btDeformableRigidDynamicsWorld.cpp @@ -136,7 +136,7 @@ void btDeformableRigidDynamicsWorld::integrateTransforms(btScalar dt) btSoftBody* psb = m_softBodies[i]; 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; } } diff --git a/src/BulletSoftBody/btSoftBodyInternals.h b/src/BulletSoftBody/btSoftBodyInternals.h index 5756fffc7..9c732250b 100644 --- a/src/BulletSoftBody/btSoftBodyInternals.h +++ b/src/BulletSoftBody/btSoftBodyInternals.h @@ -28,6 +28,7 @@ subject to the following restrictions: #include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h" #include "BulletDynamics/Featherstone/btMultiBodyConstraint.h" #include <string.h> //for memset +#include <math.h> static void findJacobian(const btMultiBodyLinkCollider* multibodyLinkCol, btMultiBodyJacobianData& jacobianData, const btVector3& contact_point, @@ -954,7 +955,7 @@ struct btSoftColliders { // resolve contact at x_n 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; const btScalar fc = psb->m_cfg.kDF * m_colObj1Wrap->getCollisionObject()->getFriction(); c.m_c2 = ima * psb->m_sst.sdt; |