A sphere, represented by its center and radius.
Allocates a new <GrapheneSphere>.
The contents of the newly allocated structure are undefined.
Returned: a <GrapheneSphere>.
the newly allocated <GrapheneSphere>. Use
sphere:free to free the resources allocated by
this function
Checks whether the given point is contained in the volume of a
<GrapheneSphere>.
Passed: a <GrapheneSphere>.
Passed: a <GraphenePoint3D>.
Returned: a boolean.
true if the sphere contains the point
Computes the distance of the given point from the surface of a
<GrapheneSphere>.
Passed: a <GrapheneSphere>.
Passed: a <GraphenePoint3D>.
Returned: a real number.
the distance of the point
Checks whether two <GrapheneSphere> are equal.
Passed: a <GrapheneSphere>.
Passed: a <GrapheneSphere>.
Returned: a boolean.
true if the spheres are equal
Frees the resources allocated by sphere:alloc.
Passed: a <GrapheneSphere>.
Computes the bounding box capable of containing the given
<GrapheneSphere>.
Passed: a <GrapheneSphere>.
Passed, filled in, and returned: a <GrapheneBox>.
return location for the bounding box
Retrieves the coordinates of the center of a
<GrapheneSphere>.
Passed: a <GrapheneSphere>.
Passed, filled in, and returned: a
<GraphenePoint3D>.
return location for the coordinates of the center
Retrieves the radius of a <GrapheneSphere>.
Passed: a <GrapheneSphere>.
Returned: a real number.
Initializes the given <GrapheneSphere> with the
given center and radius.
Passed: a <GrapheneSphere>.
the <GrapheneSphere> to initialize
Passed: a <GraphenePoint3D>, or #f.
the coordinates of the center of the sphere, or #f for a center
in (0, 0, 0)
Passed: a real number.
the radius of the sphere
Returned: a <GrapheneSphere>.
the initialized <GrapheneSphere>
Initializes the given <GrapheneSphere> using the
given array of 3D coordinates so that the sphere includes them.
The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all points.
Passed: a <GrapheneSphere>.
the <GrapheneSphere> to initialize
Passed: a list or vector, each a
<GraphenePoint3D>.
an array of <GraphenePoint3D>
Passed, or left out: a <GraphenePoint3D>, or
#f.
the center of the sphere
Returned: a <GrapheneSphere>.
the initialized <GrapheneSphere>
Not passed: guile-gi gives the length of points.
the number of <GraphenePoint3D> in the
points array
Initializes the given <GrapheneSphere> using the
given array of 3D coordinates so that the sphere includes them.
The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all vectors.
Passed: a <GrapheneSphere>.
the <GrapheneSphere> to initialize
Passed: a list or vector, each a <GrapheneVec3>.
an array of <GrapheneVec3>
Passed, or left out: a <GraphenePoint3D>, or
#f.
the center of the sphere
Returned: a <GrapheneSphere>.
the initialized <GrapheneSphere>
Not passed: guile-gi gives the length of vectors.
the number of <GrapheneVec3> in the vectors
array
Checks whether the sphere has a zero radius.
Passed: a <GrapheneSphere>.
Returned: a boolean.
true if the sphere is empty
Translates the center of the given <GrapheneSphere>
using the point coordinates as the delta of the translation.
Passed: a <GrapheneSphere>.
Passed: a <GraphenePoint3D>.
the coordinates of the translation
Passed, filled in, and returned: a
<GrapheneSphere>.
return location for the translated sphere