graphene.sphere
Module for Sphere class
class Sphere
Types 1
classSphere : gobject.boxed.Boxed
A sphere, represented by its center and radius.
Methods
graphene.sphere.Sphere alloc()Allocates a new #graphene_sphere_t.bool containsPoint(graphene.point3_d.Point3D point)Checks whether the given point is contained in the volume of a #graphene_sphere_t.float distance(graphene.point3_d.Point3D point)Computes the distance of the given point from the surface of a #graphene_sphere_t.bool equal(graphene.sphere.Sphere b)Checks whether two #graphene_sphere_t are equal.void getBoundingBox(out graphene.box.Box box)Computes the bounding box capable of containing the given #graphene_sphere_t.void getCenter(out graphene.point3_d.Point3D center)Retrieves the coordinates of the center of a #graphene_sphere_t.float getRadius()Retrieves the radius of a #graphene_sphere_t. Returns:graphene.sphere.Sphere init_(graphene.point3_d.Point3D center, float radius)Initializes 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)Initializes 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)Initializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.bool isEmpty()Checks whether the sphere has a zero radius. Returns: `true` if the sphere is emptyvoid translate(graphene.point3_d.Point3D point, out graphene.sphere.Sphere res)Translates the center of the given #graphene_sphere_t using the point coordinates as the delta of the translation.