A sphere, represented by its center and radius.
function Contains_Point
(Self : not null access Graphene_Sphere_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T)
return Boolean
Checks whether the given Point is contained in the volume of a Graphene.Sphere.Graphene_Sphere_T. Since: gtk+ 1.2
a Graphene.Point3d.Graphene_Point3D_T
true if the sphere contains the point
function Distance
(Self : not null access Graphene_Sphere_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T)
return Interfaces.C.C_float
Computes the distance of the given Point from the surface of a Graphene.Sphere.Graphene_Sphere_T. Since: gtk+ 1.2
a Graphene.Point3d.Graphene_Point3D_T
the distance of the point
function Equal
(Self : not null access Graphene_Sphere_T;
B : not null access Graphene_Sphere_T) return Boolean
Checks whether two Graphene.Sphere.Graphene_Sphere_T are equal. Since: gtk+ 1.2
a Graphene.Sphere.Graphene_Sphere_T
true if the spheres are equal
procedure Free (Self : not null access Graphene_Sphere_T)
Frees the resources allocated by graphene_sphere_alloc. Since: gtk+ 1.2
function From_Object_Free
(B : not null access Graphene_Sphere_T) return Graphene_Sphere_T
Return the underlying object and free the pointer. This is meant to be used internally by GtkAda, and should not in general be called by user code.
procedure Get_Bounding_Box
(Self : not null access Graphene_Sphere_T;
Box : not null access Graphene.Box.Graphene_Box_T)
Computes the bounding box capable of containing the given Graphene.Sphere.Graphene_Sphere_T. Since: gtk+ 1.2
return location for the bounding box
procedure Get_Center
(Self : not null access Graphene_Sphere_T;
Center : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the coordinates of the center of a Graphene.Sphere.Graphene_Sphere_T. Since: gtk+ 1.2
return location for the coordinates of the center
function Get_Radius
(Self : not null access Graphene_Sphere_T) return Interfaces.C.C_float
Retrieves the radius of a Graphene.Sphere.Graphene_Sphere_T. Since: gtk+ 1.2
function Get_Type return Glib.GType
type Graphene_Sphere_T is record
Center : Graphene.Vec3.Graphene_Vec3_T;
Radius : Interfaces.C.C_float;
end record;
A sphere, represented by its center and radius.
function Init
(Self : not null access Graphene_Sphere_T;
Center : access Graphene.Point3d.Graphene_Point3D_T;
Radius : Interfaces.C.C_float) return access Graphene_Sphere_T
Initializes the given Graphene.Sphere.Graphene_Sphere_T with the given Center and Radius. Since: gtk+ 1.2
the coordinates of the center of the sphere, or null for a center in (0, 0, 0)
the radius of the sphere
the initialized Graphene.Sphere.Graphene_Sphere_T
function Init_From_Points
(Self : not null access Graphene_Sphere_T;
Points : Graphene.Point3d.Graphene_Point3d_Array;
Center : access Graphene_Point3d_T := null) return access Graphene_Sphere_T
Initializes the given Graphene.Sphere.Graphene_Sphere_T using the given array of 3D coordinates so that the sphere includes them. The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all Points. Since: gtk+ 1.2
an array of graphene_point3d_t
the center of the sphere
the initialized Graphene.Sphere.Graphene_Sphere_T
function Init_From_Vectors
(Self : not null access Graphene_Sphere_T;
Vectors : Graphene_Vec3_Array;
Center : access Graphene.Point3d.Graphene_Point3D_T)
return access Graphene_Sphere_T
Initializes the given Graphene.Sphere.Graphene_Sphere_T using the given array of 3D coordinates so that the sphere includes them. The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all Vectors. Since: gtk+ 1.2
an array of Graphene.Vec3.Graphene_Vec3_T
the center of the sphere
the initialized Graphene.Sphere.Graphene_Sphere_T
function Is_Empty
(Self : not null access Graphene_Sphere_T) return Boolean
Checks whether the sphere has a zero radius. Since: gtk+ 1.2
true if the sphere is empty
procedure Translate
(Self : not null access Graphene_Sphere_T;
Point : not null access Graphene.Point3d.Graphene_Point3D_T;
Res : not null access Graphene_Sphere_T)
Translates the center of the given Graphene.Sphere.Graphene_Sphere_T using the Point coordinates as the delta of the translation. Since: gtk+ 1.2
the coordinates of the translation
return location for the translated sphere