graphene.sphere

Module for [Sphere] class

class Sphere

Types 1

A sphere, represented by its center and radius.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
Sphere self() nothrowReturns `this`, for use in `with` statements.
graphene.sphere.Sphere alloc() static nothrowAllocates a new #graphene_sphere_t.
bool containsPoint(graphene.point3_d.Point3D point) nothrowChecks whether the given point is contained in the volume of a #graphene_sphere_t.
float distance(graphene.point3_d.Point3D point) nothrowComputes the distance of the given point from the surface of a #graphene_sphere_t.
bool equal(graphene.sphere.Sphere b) nothrowChecks whether two #graphene_sphere_t are equal.
void getBoundingBox(out graphene.box.Box box) nothrowComputes the bounding box capable of containing the given #graphene_sphere_t.
void getCenter(out graphene.point3_d.Point3D center) nothrowRetrieves the coordinates of the center of a #graphene_sphere_t.
float getRadius() nothrowRetrieves the radius of a #graphene_sphere_t. Returns:
graphene.sphere.Sphere init_(graphene.point3_d.Point3D center, float radius) nothrowInitializes the given #graphene_sphere_t with the given center and radius.
graphene.sphere.Sphere initFromPoints(graphene.point3_d.Point3D[] points, graphene.point3_d.Point3D center) nothrowInitializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.
graphene.sphere.Sphere initFromVectors(graphene.vec3.Vec3[] vectors, graphene.point3_d.Point3D center) nothrowInitializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.
bool isEmpty() nothrowChecks whether the sphere has a zero radius. Returns: `true` if the sphere is empty
void translate(graphene.point3_d.Point3D point, out graphene.sphere.Sphere res) nothrowTranslates the center of the given #graphene_sphere_t using the point coordinates as the delta of the translation.
Constructors
this()Create a `sphere.Sphere` boxed type.
this(void * ptr, Flag!"Take" take)