static VALUE rb_cpSegmentInitialize(VALUE self, VALUE body, VALUE a, VALUE b, VALUE r) { cpSegmentShape *seg = (cpSegmentShape *)SHAPE(self); cpSegmentShapeInit(seg, BODY(body), *VGET(a), *VGET(b), NUM2DBL(r)); seg->shape.data = (void *)self; seg->shape.collision_type = Qnil; rb_ivar_set(self, id_body, body); return self; }
cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat r) { return (cpShape *)cpSegmentShapeInit(cpSegmentShapeAlloc(), body, a, b, r); }
void wrSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect *a, cpVect *b, cpFloat r) { cpSegmentShapeInit(seg, body, *a, *b, r); }