Sphere
Object Hierarchy:
Description:
[ CCode ( cname = "graphene_sphere_t" , copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "graphene_sphere_get_type ()" ) ]
[ Version ( since = "1.2" ) ]
public struct Sphere
A sphere, represented by its center and radius.
Content:
Methods:
- public bool contains_point (Point3D point)
Checks whether the given point
is contained in the volume of a
Sphere.
- public float distance (Point3D point)
Computes the distance of the given point
from the surface of a
Sphere.
- public bool equal (Sphere b)
Checks whether two Sphere are equal.
- public Box get_bounding_box ()
Computes the bounding box capable of containing the given
Sphere.
- public Point3D get_center ()
Retrieves the coordinates of the center of a Sphere
.
- public float get_radius ()
Retrieves the radius of a Sphere.
- public unowned Sphere? init (Point3D? center, float radius)
Initializes the given Sphere with the given
center
and radius
.
- public unowned Sphere? init_from_points (Point3D[] points, Point3D? center)
Initializes the given Sphere using the given
array of 3D coordinates so that the sphere includes them.
- public unowned Sphere? init_from_vectors (Vec3[] vectors, Point3D? center)
Initializes the given Sphere using the given
array of 3D coordinates so that the sphere includes them.
- public bool is_empty ()
Checks whether the sphere has a zero radius.
- public Sphere translate (Point3D point)
Translates the center of the given Sphere using
the point
coordinates as the delta of the translation.