コード例 #1
0
static mrb_value
ratchet_joint_set_angle(mrb_state *mrb, mrb_value self)
{
  cpConstraint *constraint;
  mrb_float angle;
  mrb_get_args(mrb, "f", &angle);
  Data_Get_Struct(mrb, self, &mrb_cp_constraint_type, constraint);
  cpRatchetJointSetAngle(constraint, (cpFloat)angle);
  return mrb_nil_value();
}
コード例 #2
0
void PhysicsJointRatchet::setAngle(float angle)
{
    cpRatchetJointSetAngle(_cpConstraints.front(), PhysicsHelper::float2cpfloat(angle));
}