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.
function Equal
(Self : not null access Graphene_Ray_T;
B : not null access Graphene_Ray_T) return Boolean
Checks whether the two given Graphene.Ray.Graphene_Ray_T are equal. Since: gtk+ 1.4
a Graphene.Ray.Graphene_Ray_T
true if the given rays are equal
procedure Free (Self : not null access Graphene_Ray_T)
Frees the resources allocated by graphene_ray_alloc. Since: gtk+ 1.4
function From_Object_Free
(B : not null access Graphene_Ray_T) return Graphene_Ray_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_Closest_Point_To_Point
(Self : not null access Graphene_Ray_T;
P : not null access Graphene.Point3d.Graphene_Point3D_T;
Res : not null access Graphene.Point3d.Graphene_Point3D_T)
Computes the point on the given Graphene.Ray.Graphene_Ray_T that is closest to the given point P. Since: gtk+ 1.4
a Graphene.Point3d.Graphene_Point3D_T
return location for the closest point3d
procedure Get_Direction
(Self : not null access Graphene_Ray_T;
Direction : not null access Graphene.Vec3.Graphene_Vec3_T)
Retrieves the direction of the given Graphene.Ray.Graphene_Ray_T. Since: gtk+ 1.4
return location for the direction
function Get_Distance_To_Plane
(Self : not null access Graphene_Ray_T;
P : not null access Graphene.Plane.Graphene_Plane_T)
return Interfaces.C.C_float
Computes the distance of the origin of the given Graphene.Ray.Graphene_Ray_T from the given plane. If the ray does not intersect the plane, this function returns INFINITY. Since: gtk+ 1.4
a Graphene.Plane.Graphene_Plane_T
the distance of the origin of the ray from the plane
function Get_Distance_To_Point
(Self : not null access Graphene_Ray_T;
P : not null access Graphene.Point3d.Graphene_Point3D_T)
return Interfaces.C.C_float
Computes the distance of the closest approach between the given Graphene.Ray.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. Since: gtk+ 1.4
a Graphene.Point3d.Graphene_Point3D_T
the distance of the point
procedure Get_Origin
(Self : not null access Graphene_Ray_T;
Origin : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the origin of the given Graphene.Ray.Graphene_Ray_T. Since: gtk+ 1.4
return location for the origin
procedure Get_Position_At
(Self : not null access Graphene_Ray_T;
T : Interfaces.C.C_float;
Position : not null access Graphene.Point3d.Graphene_Point3D_T)
Retrieves the coordinates of a point at the distance T along the given Graphene.Ray.Graphene_Ray_T. Since: gtk+ 1.4
the distance along the ray
return location for the position
function Get_Type return Glib.GType
type graphene_ray_intersection_kind_t is (
Graphene_Ray_Intersection_Kind_None,
Graphene_Ray_Intersection_Kind_Enter,
Graphene_Ray_Intersection_Kind_Leave);
The type of intersection.
package graphene_ray_intersection_kind_t_Properties is
new Generic_Internal_Discrete_Property (graphene_ray_intersection_kind_t);
type Graphene_Ray_T is record
Origin : Graphene.Vec3.Graphene_Vec3_T;
Direction : Graphene.Vec3.Graphene_Vec3_T;
end record;
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.
function Init
(Self : not null access Graphene_Ray_T;
Origin : access Graphene.Point3d.Graphene_Point3D_T;
Direction : access Graphene.Vec3.Graphene_Vec3_T)
return access Graphene_Ray_T
Initializes the given Graphene.Ray.Graphene_Ray_T using the given Origin and Direction values. Since: gtk+ 1.4
the origin of the ray
the direction vector
the initialized ray
function Init_From_Ray
(Self : not null access Graphene_Ray_T;
Src : not null access Graphene_Ray_T) return access Graphene_Ray_T
Initializes the given Graphene.Ray.Graphene_Ray_T using the origin and direction values of another Graphene.Ray.Graphene_Ray_T. Since: gtk+ 1.4
a Graphene.Ray.Graphene_Ray_T
the initialized ray
function Init_From_Vec3
(Self : not null access Graphene_Ray_T;
Origin : access Graphene.Vec3.Graphene_Vec3_T;
Direction : access Graphene.Vec3.Graphene_Vec3_T)
return access Graphene_Ray_T
Initializes the given Graphene.Ray.Graphene_Ray_T using the given vectors. Since: gtk+ 1.4
a Graphene.Vec3.Graphene_Vec3_T
a Graphene.Vec3.Graphene_Vec3_T
the initialized ray
function Intersect_Box
(Self : not null access Graphene_Ray_T;
B : not null access Graphene.Box.Graphene_Box_T;
T_Out : out Interfaces.C.C_float)
return graphene_ray_intersection_kind_t
Intersects the given Graphene.Ray.Graphene_Ray_T R with the given Graphene.Box.Graphene_Box_T B. Since: gtk+ 1.10
a Graphene.Box.Graphene_Box_T
the distance of the point on the ray that intersects the box
the type of intersection
function Intersect_Sphere
(Self : not null access Graphene_Ray_T;
S : not null access Graphene.Sphere.Graphene_Sphere_T;
T_Out : out Interfaces.C.C_float)
return graphene_ray_intersection_kind_t
Intersects the given Graphene.Ray.Graphene_Ray_T R with the given Graphene.Sphere.Graphene_Sphere_T S. Since: gtk+ 1.10
a Graphene.Sphere.Graphene_Sphere_T
the distance of the point on the ray that intersects the sphere
the type of intersection
function Intersect_Triangle
(Self : not null access Graphene_Ray_T;
T : not null access Graphene.Triangle.Graphene_Triangle_T;
T_Out : out Interfaces.C.C_float)
return graphene_ray_intersection_kind_t
Intersects the given Graphene.Ray.Graphene_Ray_T R with the given Graphene.Triangle.Graphene_Triangle_T T. Since: gtk+ 1.10
a Graphene.Triangle.Graphene_Triangle_T
the distance of the point on the ray that intersects the triangle
the type of intersection
function Intersects_Box
(Self : not null access Graphene_Ray_T;
B : not null access Graphene.Box.Graphene_Box_T) return Boolean
Checks whether the given Graphene.Ray.Graphene_Ray_T R intersects the given Graphene.Box.Graphene_Box_T B. See also: Graphene.Ray.Intersect_Box Since: gtk+ 1.10
a Graphene.Box.Graphene_Box_T
true if the ray intersects the box
function Intersects_Sphere
(Self : not null access Graphene_Ray_T;
S : not null access Graphene.Sphere.Graphene_Sphere_T)
return Boolean
Checks if the given Graphene.Ray.Graphene_Ray_T R intersects the given Graphene.Sphere.Graphene_Sphere_T S. See also: Graphene.Ray.Intersect_Sphere Since: gtk+ 1.10
a Graphene.Sphere.Graphene_Sphere_T
true if the ray intersects the sphere
function Intersects_Triangle
(Self : not null access Graphene_Ray_T;
T : not null access Graphene.Triangle.Graphene_Triangle_T)
return Boolean
Checks whether the given Graphene.Ray.Graphene_Ray_T R intersects the given Graphene.Triangle.Graphene_Triangle_T B. See also: Graphene.Ray.Intersect_Triangle Since: gtk+ 1.10
a Graphene.Triangle.Graphene_Triangle_T
true if the ray intersects the triangle
type Property_graphene_ray_intersection_kind_t is new graphene_ray_intersection_kind_t_Properties.Property;