Create a circle with the given radius and optional local centre-of-mass offset.
Circle radius (must be > 0).
OptionallocalCOM: Vec2Local centre offset (defaults to origin).
Optionalmaterial: MaterialMaterial to assign (uses default if omitted).
Optionalfilter: InteractionFilterInteractionFilter to assign (uses default if omitted).
Angular drag coefficient for this shape.
Cross-sectional area of this shape.
World-space AABB of this shape (updated each step).
Cast to Body — returns the Body wrapper if this is a Body, else null.
Cast to Capsule, or null if this is not a capsule.
Cast to Circle, or null if this is not a circle.
Cast to Compound — returns the Compound wrapper if this is a Compound, else null.
Cast to Polygon, or null if this is not a polygon.
Cast to Shape — returns the Shape wrapper if this is a Shape, else null.
Set of callback types registered on this shape for event dispatch.
The InteractionFilter controlling which shapes interact with this one.
If true, this shape participates in fluid interaction.
Fluid simulation properties for this shape. Auto-created on first access.
The interaction group this interactor belongs to.
Unique numeric identifier for this interactor.
Contribution to moment of inertia (about local centroid, unit density).
The circle's radius. Must be > 0.
If true, this shape acts as a sensor (no physical response, only callbacks).
The shape type: CIRCLE or POLYGON.
User-defined data storage object.
World-space centre of mass of this shape (read-only, lazy-computed).
Return true if the given world-space point lies inside this shape. Requires the shape to be attached to a Body.
The world-space point to test.
True if the point is inside this shape.
Create a deep copy of this shape with the same type, geometry, material, and filter.
A new Shape instance independent of this one.
Returns true if this interactor is a Body.
Returns true if this is a Capsule shape.
Returns true if this is a Circle shape.
Returns true if this interactor is a Compound.
Returns true if this is a Polygon shape.
Returns true if this interactor is a Shape.
Rotate the shape's local vertices by angle radians.
Rotation in radians.
this for chaining.
Scale the shape's local geometry. Circles require uniform scaling.
Horizontal scale factor (must be non-zero).
Vertical scale factor (must be non-zero).
this for chaining.
Apply a Mat23 affine transform to the shape's local geometry.
The transformation matrix (must be non-singular; Circles require equiorthogonal).
this for chaining.
A circular physics shape. The simplest and most performant collision shape.