bullet: Sync with current upstream master branch

This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc.
We need a recent master commit for some new features that we use in Godot
(see #25543 and #28909).

To avoid warnings generated by Bullet headers included in our own module,
we include those headers with -isystem on GCC and Clang.

Fixes #29503.
This commit is contained in:
Rémi Verschelde
2019-06-11 13:18:05 +02:00
parent 7b883d7d50
commit 99acec63f1
52 changed files with 1481 additions and 443 deletions
+1 -1
View File
@@ -349,7 +349,7 @@ int MultiBodyTree::finalize()
const int &num_bodies = m_init_cache->numBodies();
const int &num_dofs = m_init_cache->numDoFs();
if (num_dofs <= 0)
if (num_dofs < 0)
{
bt_id_error_message("Need num_dofs>=1, but num_dofs= %d\n", num_dofs);
//return -1;
@@ -479,9 +479,17 @@ int MultiBodyTree::MultiBodyImpl::calculateKinematics(const vecx &q, const vecx
//todo: review
RigidBody &body = m_body_list[m_body_spherical_list[i]];
body.m_body_T_parent = transformZ(q(body.m_q_index + 2)) *
transformY(q(body.m_q_index + 1)) *
transformX(q(body.m_q_index));
mat33 T;
T = transformX(q(body.m_q_index)) *
transformY(q(body.m_q_index + 1)) *
transformZ(q(body.m_q_index + 2));
body.m_body_T_parent = T * body.m_body_T_parent_ref;
body.m_parent_pos_parent_body(0)=0;
body.m_parent_pos_parent_body(1)=0;
body.m_parent_pos_parent_body(2)=0;
body.m_parent_pos_parent_body = body.m_body_T_parent * body.m_parent_pos_parent_body;
if (type >= POSITION_VELOCITY)
@@ -832,6 +840,25 @@ int MultiBodyTree::MultiBodyImpl::calculateMassMatrix(const vecx &q, const bool
body.m_parent_pos_parent_body = body.m_body_T_parent * body.m_parent_pos_parent_body;
}
for (idArrayIdx i = 0; i < m_body_spherical_list.size(); i++)
{
//todo: review
RigidBody &body = m_body_list[m_body_spherical_list[i]];
mat33 T;
T = transformX(q(body.m_q_index)) *
transformY(q(body.m_q_index + 1)) *
transformZ(q(body.m_q_index + 2));
body.m_body_T_parent = T * body.m_body_T_parent_ref;
body.m_parent_pos_parent_body(0)=0;
body.m_parent_pos_parent_body(1)=0;
body.m_parent_pos_parent_body(2)=0;
body.m_parent_pos_parent_body = body.m_body_T_parent * body.m_parent_pos_parent_body;
}
}
for (int i = m_body_list.size() - 1; i >= 0; i--)
{