add option to disable btMultiBody self-collision (for the entire hierarchy) or to disable parent-child collision for jointed links.

This commit is contained in:
erwin.coumans@gmail.com
2013-10-08 00:50:40 +00:00
parent 34d975143e
commit d4640227ce
5 changed files with 68 additions and 12 deletions

View File

@@ -20,7 +20,10 @@ subject to the following restrictions:
#include "LinearMath/btVector3.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
enum btMultiBodyLinkFlags
{
BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION = 1
};
//
// Link struct
//
@@ -64,6 +67,7 @@ struct btMultibodyLink
btScalar joint_torque;
class btMultiBodyLinkCollider* m_collider;
int m_flags;
// ctor: set some sensible defaults
btMultibodyLink()
@@ -74,7 +78,8 @@ struct btMultibodyLink
is_revolute(false),
cached_rot_parent_to_this(1, 0, 0, 0),
joint_torque(0),
m_collider(0)
m_collider(0),
m_flags(0)
{
inertia.setValue(1, 1, 1);
axis_top.setValue(0, 0, 0);