Basics
Guides
API Reference
Basics
Guides
API Reference
[12:14] static extends: object
Generated struct layout helper for GIR record Sphere.
layout ()
Returns the Panama struct layout for
Sphere.
[28:7] extends: object
A sphere, represented by its center and radius.
GrapheneSphere (Handle = null)
Allocates a new #graphene_sphere_t. The contents of the newly allocated structure are undefined.
Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.contains_point (object point)
Checks whether the given @point is contained in the volume of a #graphene_sphere_t.
point is a #graphene_point3d_t.true if the sphere contains the point.distance (object point)
Computes the distance of the given @point from the surface of a #graphene_sphere_t.
point is a #graphene_point3d_t.the distance of the point.equal (object b)
Checks whether two #graphene_sphere_t are equal.
b is a #graphene_sphere_t.true if the spheres are equal.free ()
Frees the resources allocated by graphene_sphere_alloc().
None.get_bounding_box ()
Computes the bounding box capable of containing the given #graphene_sphere_t.
box is return location for the bounding box.None.get_center ()
Retrieves the coordinates of the center of a #graphene_sphere_t.
center is return location for the coordinates of the center.None.get_radius ()
Retrieves the radius of a #graphene_sphere_t.
init (object center, double radius)
Initializes the given #graphene_sphere_t with the given @center and
center is the coordinates of the center of the sphere, or %NULL for a center in (0, 0, 0).radius is the radius of the sphere.the initialized #graphene_sphere_t.init_from_points (list points, object center)
Initializes the given #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.
n_points is the number of #graphene_point3d_t in the @points array.points is an array of #graphene_point3d_t.center is the center of the sphere.the initialized #graphene_sphere_t.init_from_vectors (list vectors, object center)
Initializes the given #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.
n_vectors is the number of #graphene_vec3_t in the @vectors array.vectors is an array of #graphene_vec3_t.center is the center of the sphere.the initialized #graphene_sphere_t.is_empty ()
Checks whether the sphere has a zero radius.
true if the sphere is empty.translate (object point)
Translates the center of the given #graphene_sphere_t using the @point coordinates as the delta of the translation.
point is the coordinates of the translation.res is return location for the translated sphere.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.