Basics
Guides
API Reference
Basics
Guides
API Reference
[12:14] static extends: object
Generated struct layout helper for GIR record Box.
layout ()
Returns the Panama struct layout for
Box.
[28:7] extends: object
A 3D box, described as the volume between a minimum and a maximum vertices.
GrapheneBox (Handle = null)
Allocates a new #graphene_box_t. The contents of the returned 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_box (object b)
Checks whether the #graphene_box_t @a contains the given #graphene_box_t
b is a #graphene_box_t.true if the box is contained in the given box.contains_point (object point)
Checks whether @box contains the given @point.
point is the coordinates to check.true if the point is contained in the given box.equal (object b)
Checks whether the two given boxes are equal.
b is a #graphene_box_t.true if the boxes are equal.expand (object point)
Expands the dimensions of @box to include the coordinates at @point.
point is the coordinates of the point to include.res is return location for the expanded box.None.expand_scalar (double scalar)
Expands the dimensions of @box by the given @scalar value. If @scalar is positive, the #graphene_box_t will grow; if @scalar is negative, the #graphene_box_t will shrink.
scalar is a scalar value.res is return location for the expanded box.None.expand_vec3 (object vec)
Expands the dimensions of @box to include the coordinates of the given vector.
vec is the coordinates of the point to include, as a #graphene_vec3_t.res is return location for the expanded box.None.free ()
Frees the resources allocated by graphene_box_alloc().
None.get_bounding_sphere ()
Computes the bounding #graphene_sphere_t capable of containing the given #graphene_box_t.
sphere is return location for the bounding sphere.None.get_center ()
Retrieves the coordinates of the center of a #graphene_box_t.
center is return location for the coordinates of the center.None.get_depth ()
Retrieves the size of the @box on the Z axis.
the depth of the box.get_height ()
Retrieves the size of the @box on the Y axis.
the height of the box.get_max ()
Retrieves the coordinates of the maximum point of the given #graphene_box_t.
max is return location for the maximum point.None.get_min ()
Retrieves the coordinates of the minimum point of the given #graphene_box_t.
min is return location for the minimum point.None.get_minmax ()
Retrieves the coordinates of the minimum and maximum points of the given #graphene_box_t
min is return location for the minimum point.max is return location for the maximum point.None.get_size ()
Retrieves the size of the box on all three axes, and stores it into the given @size vector.
size is return location for the size.None.get_vertices ()
Computes the vertices of the given #graphene_box_t.
vertices is return location for an array of 8 #graphene_vec3_t.None.get_width ()
Retrieves the size of the @box on the X axis.
the width of the box.init (object min, object max)
Initializes the given #graphene_box_t with two vertices.
min is the coordinates of the minimum vertex.max is the coordinates of the maximum vertex.the initialized #graphene_box_t.init_from_box (object src)
Initializes the given #graphene_box_t with the vertices of another #graphene_box_t.
src is a #graphene_box_t.the initialized #graphene_box_t.init_from_points (list points)
Initializes the given #graphene_box_t with the given array of vertices. If @n_points is 0, the returned box is initialized with graphene_box_empty().
n_points is the number #graphene_point3d_t in the @points array.points is an array of #graphene_point3d_t.the initialized #graphene_box_t.init_from_vec3 (object min, object max)
Initializes the given #graphene_box_t with two vertices stored inside #graphene_vec3_t.
min is the coordinates of the minimum vertex.max is the coordinates of the maximum vertex.the initialized #graphene_box_t.init_from_vectors (list vectors)
Initializes the given #graphene_box_t with the given array of vertices. If @n_vectors is 0, the returned box is initialized with graphene_box_empty().
n_vectors is the number #graphene_point3d_t in the @vectors array.vectors is an array of #graphene_vec3_t.the initialized #graphene_box_t.intersection (object b)
Intersects the two given #graphene_box_t. If the two boxes do not intersect, @res will contain a degenerate box initialized with graphene_box_empty().
b is a #graphene_box_t.res is return location for the result.true if the two boxes intersect.union (object b)
Unions the two given #graphene_box_t.
b is the box to union to @a.res is return location for the result.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.