def __init__(self, body, a, b, radius): """Create a Segment :Parameters: body : `Body` The body to attach the segment to a : (x,y) or `Vec2d` The first endpoint of the segment b : (x,y) or `Vec2d` The first endpoint of the segment radius : float The thickness of the segment """ self._body = body self._shape = cp.cpSegmentShapeNew(body._body, a, b, radius) self._shapecontents = self._shape.contents
def __init__(self, body, a, b, radius): """body is the body to attach the segment to, a and b are the endpoints, and radius is the thickness of the segment.""" self._body = body self._shape = cp.cpSegmentShapeNew(body._body, a, b, radius)