BoundingSphere class

Class representing a bounding sphere.

@author {@link https://github.com/Mugen87|Mugen87}

Constructors

BoundingSphere([Vector3? center, double radius = 0])
Constructs a new bounding sphere with the given values.

Properties

aabb AABB
final
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
Transforms this bounding sphere with the given 4x4 transformation matrix.
clampPoint(Vector3 point, Vector3 result) Vector3
Ensures the given point is inside this bounding sphere and stores the result in the given vector.
clone() BoundingSphere
Creates a new bounding sphere and copies all values from this bounding sphere.
containsPoint(Vector3 point) bool
Returns true if the given point is inside this bounding sphere.
copy(BoundingSphere sphere) BoundingSphere
Copies all values from the given bounding sphere to this bounding sphere.
equals(BoundingSphere sphere) bool
Returns true if the given bounding sphere is deep equal with this bounding sphere.
fromJSON(Map<String, dynamic> json) BoundingSphere
Restores this instance from the given JSON object.
fromPoints(List<Vector3> points) BoundingSphere
Computes a bounding sphere that encloses the given set of points.
getNormalFromSurfacePoint(Vector3 point, Vector3 result) Vector3
Returns the normal for a given point on this bounding sphere's surface.
intersectsBoundingSphere(BoundingSphere sphere) bool
Returns true if the given bounding sphere intersects this bounding sphere.
intersectsPlane(Plane plane) bool
Returns true if the given plane intersects this bounding sphere.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Vector3 center, double radius) BoundingSphere
Sets the given values to this bounding sphere.
toJSON() Map<String, dynamic>
Transforms this instance into a JSON object.
toString() String
A string representation of this object.
inherited

Operators

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