public void RemoveJoint(CCPhysicsJointInfo joint)
 {
     foreach (var subjoint in joint.getJoints())
     {
         _space.RemoveConstraint(subjoint);
     }
 }
		public void AddJoint(CCPhysicsJointInfo joint)
		{
			foreach (cpConstraint subjoint in joint.getJoints())
			{
				_space.AddConstraint(subjoint);
			}
		}
 public void AddJoint(CCPhysicsJointInfo joint)
 {
     foreach (cpConstraint subjoint in joint.getJoints())
     {
         _space.AddConstraint(subjoint);
     }
 }
		public CCPhysicsJoint()
		{
			_bodyA = null;
			_bodyB = null;
			_world = null;
			_info = null;
			_enable = false;
			_collisionEnable = true;
			_destoryMark = false;
			_tag = 0;
		}
 public CCPhysicsJoint()
 {
     _bodyA           = null;
     _bodyB           = null;
     _world           = null;
     _info            = null;
     _enable          = false;
     _collisionEnable = true;
     _destoryMark     = false;
     _tag             = 0;
 }
        protected bool Init(CCPhysicsBody a, CCPhysicsBody b)
        {
            cp.AssertWarn(a != null && b != null, "the body passed in is nil");
            cp.AssertWarn(a != b, "the two bodies are equal");
            _info = new CCPhysicsJointInfo(this);

            if (_info != null)
            {
                return(false);
            }

            _bodyA = a;
            _bodyA._joints.Add(this);
            _bodyB = b;
            _bodyB._joints.Add(this);

            return(true);
        }
		public void removeJoint(CCPhysicsJointInfo joint)
		{
			foreach (var subjoint in joint.getJoints())
			{
				_space.RemoveConstraint(subjoint);
			}
		}
		protected bool Init(CCPhysicsBody a, CCPhysicsBody b)
		{
			cp.AssertWarn(a != null && b != null, "the body passed in is nil");
			cp.AssertWarn(a != b, "the two bodies are equal");
			_info = new CCPhysicsJointInfo(this);

			if (_info != null)
				return false;

			_bodyA = a;
			_bodyA._joints.Add(this);
			_bodyB = b;
			_bodyB._joints.Add(this);

			return true;
		}