Circle
geometry/circle.ts:18Defines a circle as a pure shape: it is described entirely by its radius
and has no position of its own. Where a circle "is" in the world is the
responsibility of whatever owns it (e.g. a transform / WorldObject
position).
Consequently, geometric queries operate in the circle's local space, where
the circle is centered on the origin 0,0. Callers map world coordinates
into that space (and supply the relative offset between two shapes) before
calling.
A negative radius is treated as having no area for containment and
intersection purposes.
Constructors
Properties
Accessors
Methods
containsPoint(point: PointPrimitive): boolean Determines whether a point lies inside this circle. The point is expressed in the circle's local space (relative to its center). A point exactly on the edge is treated as contained.
Parameters
-
pointPointPrimitive
Returns
boolean intersectsCircle(other: Circle, offset: PointPrimitive): boolean Determines whether this circle overlaps another circle. Circles that touch at exactly one point are considered intersecting.
Parameters
-
otherCircle -
offsetPointPrimitive
Returns
boolean toString(): string Returns a string representation of this circle.
Returns
string