Пример #1
0
/* returns the joint second anchoring point */
void joint_anchor2 (t_real *anchor, dJointID j) {
  dVector3 joint_position;
  int joint_type;
  joint_type = dJointGetType (j);
  if (joint_type == dJointTypeBall) {
    dJointGetBallAnchor2 (j, joint_position);
  }
  else {
    err_message ("Unrecognized joint type\n");
    exit (EXIT_FAILURE);
  }
  vector_set (anchor, joint_position [0], joint_position [1], joint_position [2]);
}
Vec3f PhysicsBallJoint::getAnchor2(void)
{
	dVector3 a;
	dJointGetBallAnchor2(_JointID, a);
	return Vec3f(a[0], a[1], a[2]);
}