Basics
Guides
API Reference
Basics
Guides
API Reference
[13:14] static extends: object
Generated struct layout helper for GIR record Ray.
layout ()
Returns the Panama struct layout for
Ray.
[30:7] extends: object
A ray emitted from an origin in a given direction. The contents of the
graphene_ray_t structure are private, and should not be modified directly.
GrapheneRay (Handle = null)
Allocates a new #graphene_ray_t structure. 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.equal (object b)
Checks whether the two given #graphene_ray_t are equal.
b is a #graphene_ray_t.true if the given rays are equal.free ()
Frees the resources allocated by graphene_ray_alloc().
None.get_closest_point_to_point (object p)
Computes the point on the given #graphene_ray_t that is closest to the given point @p.
p is a #graphene_point3d_t.res is return location for the closest point3d.None.get_direction ()
Retrieves the direction of the given #graphene_ray_t.
direction is return location for the direction.None.get_distance_to_plane (object p)
Computes the distance of the origin of the given #graphene_ray_t from the given plane. If the ray does not intersect the plane, this function returns
INFINITY.
p is a #graphene_plane_t.the distance of the origin of the ray from the plane.get_distance_to_point (object p)
Computes the distance of the closest approach between the given #graphene_ray_t @r and the point @p. The closest approach to a ray from a point is the distance between the point and the projection of the point on the ray itself.
p is a #graphene_point3d_t.the distance of the point.get_origin ()
Retrieves the origin of the given #graphene_ray_t.
origin is return location for the origin.None.get_position_at (double t)
Retrieves the coordinates of a point at the distance @t along the given #graphene_ray_t.
t is the distance along the ray.position is return location for the position.None.init (object origin, object direction)
Initializes the given #graphene_ray_t using the given @origin and
values.origin is the origin of the ray.direction is the direction vector.the initialized ray.init_from_ray (object src)
Initializes the given #graphene_ray_t using the origin and direction values of another #graphene_ray_t.
src is a #graphene_ray_t.the initialized ray.init_from_vec3 (object origin, object direction)
Initializes the given #graphene_ray_t using the given vectors.
origin is a #graphene_vec3_t.direction is a #graphene_vec3_t.the initialized ray.intersect_box (object b)
Intersects the given #graphene_ray_t @r with the given #graphene_box_t
b is a #graphene_box_t.t_out is the distance of the point on the ray that intersects the box.the type of intersection.intersect_sphere (object s)
Intersects the given #graphene_ray_t @r with the given #graphene_sphere_t
s is a #graphene_sphere_t.t_out is the distance of the point on the ray that intersects the sphere.the type of intersection.intersect_triangle (object t)
Intersects the given #graphene_ray_t @r with the given #graphene_triangle_t @t.
t is a #graphene_triangle_t.t_out is the distance of the point on the ray that intersects the triangle.the type of intersection.intersects_box (object b)
Checks whether the given #graphene_ray_t @r intersects the given #graphene_box_t @b. See also: graphene_ray_intersect_box()
b is a #graphene_box_t.true if the ray intersects the box.intersects_sphere (object s)
Checks if the given #graphene_ray_t @r intersects the given #graphene_sphere_t @s. See also: graphene_ray_intersect_sphere()
s is a #graphene_sphere_t.true if the ray intersects the sphere.intersects_triangle (object t)
Checks whether the given #graphene_ray_t @r intersects the given #graphene_triangle_t @b. See also: graphene_ray_intersect_triangle()
t is a #graphene_triangle_t.true if the ray intersects the triangle.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.