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 #graphenespheret.bool containsPoint(graphene.point3_d.Point3D point)Checks whether the given point is contained in the volume of a #graphenespheret.float distance(graphene.point3_d.Point3D point)Computes the distance of the given point from the surface of a #graphenespheret.bool equal(graphene.sphere.Sphere b)Checks whether two #graphenespheret are equal.void getBoundingBox(out graphene.box.Box box)Computes the bounding box capable of containing the given #graphenespheret.void getCenter(out graphene.point3_d.Point3D center)Retrieves the coordinates of the center of a #graphenespheret.float getRadius()Retrieves the radius of a #graphenespheret. Returns:graphene.sphere.Sphere init_(graphene.point3_d.Point3D center, float radius)Initializes the given #graphenespheret with the given center and radius.graphene.sphere.Sphere initFromPoints(graphene.point3_d.Point3D[] points, graphene.point3_d.Point3D center)Initializes the given #graphenespheret 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 #graphenespheret 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 #graphenespheret using the point coordinates as the delta of the translation.