Sphere

A Sphere is a point + a radius.

Constructors

this
this(point_t center_, T radius_)

Creates a sphere from a point and a radius.

Members

Aliases

point_t
alias point_t = Vector!(T, N)
Undocumented in source.

Functions

area
T area()
contains
bool contains(Sphere s)

Sphere contains point test.

distanceTo
T distanceTo(point_t p)

Sphere vs point Euclidean distance.

intersects
bool intersects(Sphere s)

Sphere vs sphere intersection.

squaredDistanceTo
T squaredDistanceTo(point_t p)

Sphere vs point Euclidean distance squared.

Variables

center
point_t center;
Undocumented in source.
radius
T radius;
Undocumented in source.

Meta