Sphere

A sphere, represented by its center and radius.

Members

Functions

containsPoint
bool containsPoint(graphene.point3_d.Point3D point)

Checks whether the given point is contained in the volume of a #graphene_sphere_t.

distance
float distance(graphene.point3_d.Point3D point)

Computes the distance of the given point from the surface of a #graphene_sphere_t.

equal
bool equal(graphene.sphere.Sphere b)

Checks whether two #graphene_sphere_t are equal.

getBoundingBox
void getBoundingBox(graphene.box.Box box)

Computes the bounding box capable of containing the given #graphene_sphere_t.

getCenter
void getCenter(graphene.point3_d.Point3D center)

Retrieves the coordinates of the center of a #graphene_sphere_t.

getRadius
float getRadius()

Retrieves the radius of a #graphene_sphere_t.

initFromPoints
graphene.sphere.Sphere initFromPoints(graphene.point3_d.Point3D[] points, graphene.point3_d.Point3D center)

Initializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.

initFromVectors
graphene.sphere.Sphere initFromVectors(graphene.vec3.Vec3[] vectors, graphene.point3_d.Point3D center)

Initializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.

init_
graphene.sphere.Sphere init_(graphene.point3_d.Point3D center, float radius)

Initializes the given #graphene_sphere_t with the given center and radius.

isEmpty
bool isEmpty()

Checks whether the sphere has a zero radius.

translate
void translate(graphene.point3_d.Point3D point, graphene.sphere.Sphere res)

Translates the center of the given #graphene_sphere_t using the point coordinates as the delta of the translation.

Static functions

alloc
graphene.sphere.Sphere alloc()

Allocates a new #graphene_sphere_t.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.