// SegmentShapeNew creates a new segment shape. func SegmentShapeNew(body Body, a, b Vect, radius float64) SegmentShape { s := C.cpSegmentShapeNew(body.c(), a.c(), b.c(), C.cpFloat(radius)) return SegmentShape{cpshape(s)} }
func NewSegmentShape(body *Body, a Vect, b Vect, radius float64) *Shape { var cpshape *C.cpShape = C.cpSegmentShapeNew(body.CPBody, a.CPVect, b.CPVect, C.cpFloat(radius)) return createAndRegister(cpshape) }
func NewSegmentShape(body Body, a, b Vect, radius float32) Shape { return Shape{ shape: C.cpSegmentShapeNew(body.body, C.cpVect(a), C.cpVect(b), f(radius)), } }