change btMultiBody to allow removal/changing of links

(still not easy to modify the link structure of a btMultiBody -> You have to manually re-link parents, copying links around etc)
This commit is contained in:
erwin.coumans@gmail.com
2013-10-03 05:13:41 +00:00
parent 88b8ae552b
commit 2fb686b937
7 changed files with 177 additions and 80 deletions

View File

@@ -63,6 +63,8 @@ struct btMultibodyLink
btVector3 applied_torque; // In WORLD frame
btScalar joint_torque;
class btMultiBodyLinkCollider* m_collider;
// ctor: set some sensible defaults
btMultibodyLink()
: joint_pos(0),
@@ -71,7 +73,8 @@ struct btMultibodyLink
zero_rot_parent_to_this(1, 0, 0, 0),
is_revolute(false),
cached_rot_parent_to_this(1, 0, 0, 0),
joint_torque(0)
joint_torque(0),
m_collider(0)
{
inertia.setValue(1, 1, 1);
axis_top.setValue(0, 0, 0);