CircleShape class

A circle shape.

Inheritance

Constructors

CircleShape()

Properties

childCount int
Get the number of child primitives
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
position Vector2
final
radius double
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapeType ShapeType
finalinherited

Methods

clone() Shape
override
computeAABB(AABB aabb, Transform transform, int childIndex) → void
Given a transform, compute the associated axis aligned bounding box for a child shape.
override
computeDistanceToOut(Transform xf, Vector2 p, int childIndex, Vector2 normalOut) double
Compute the distance from the current shape to the specified point. This only works for convex shapes.
override
computeMass(MassData massData, double density) → void
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin. density should be in kilograms per meter squared.
override
getSupport(Vector2 d) int
Get the supporting vertex index in the given direction.
getSupportVertex(Vector2 d) Vector2
Get the supporting vertex in the given direction.
getVertex(int index) Vector2
Get a vertex by index.
getVertexCount() int
Get the vertex count.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
raycast(RayCastOutput output, RayCastInput input, Transform transform, int childIndex) bool
Cast a ray against a child shape.
override
testPoint(Transform transform, Vector2 point) bool
Test a point for containment in this shape. This only works for convex shapes.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited