BoundingSphere class

A sphere defined by a center and radius.

Constructors

BoundingSphere([Vector3? center, double? radius])
center - center of the sphere. Default is a Vector3 at (0, 0, 0).
BoundingSphere.copy(BoundingSphere sphere)
Copies the values of the passed sphere's center and radius properties to this sphere.

Properties

center ↔ Vector3
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
radius ↔ double
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyMatrix4(Matrix4 matrix) → BoundingSphere
matrix - the Matrix4 to apply
clone() → BoundingSphere
Returns a new sphere with the same center and radius as this one.
containsPoint(Vector3 point) → bool
Returns true if this sphere contains the given point inclusive of the surface of the sphere.
empty() → BoundingSphere
Makes the sphere empty by setting center to (0, 0, 0) and radius to -1.
expandByPoint(Vector point) → BoundingSphere
point - Vector3 that should be included in the box.
intersectsBox(BoundingBox box) → bool
box - page:Box3 to check for intersection against.
intersectsPlane(Plane plane) → bool
plane - Plane to check for intersection against.
isEmpty() → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Vector3 center, double radius) → BoundingSphere
center - center of the sphere.
setFrom(BoundingSphere sphere) → BoundingSphere
Copies the values of the passed sphere's center and radius properties to this sphere.
setFromPoints(List<Vector3> points, [Vector3? optionalCenter]) → BoundingSphere
Computes the minimum bounding sphere for list of points. If the optional center point is given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing the points is calculated.
toString() → String
A string representation of this object.
inherited
union(BoundingSphere sphere) → BoundingSphere
sphere - Bounding sphere that will be unioned with this sphere.

Operators

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