CP::Shape::Circle
Inherits CP::Shape / Reference / Object
A circle shape defined by a radius
This is the fastest and simplest collision shape
Constructors
Class methods
area(r1 : Number, r2 : Number) : Float64
Calculate area of a hollow circle.
r1 and r2 are the inner and outer diameters. A solid circle has an inner diameter of 0.
Instance methods
offset=(offset : Vect)
Unsafe. Set the offset of a circle shape.
This change is only picked up as a change to the position of the shape's surface, but not its velocity. Changing it will not result in realistic physical behavior. Only use if you know what you are doing!
radius=(radius : Number)
Unsafe. Set the radius of a circle shape.
This change is only picked up as a change to the position of the shape's surface, but not its velocity. Changing it will not result in realistic physical behavior. Only use if you know what you are doing!