package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.graphene/Ocgtk_graphene/Graphene/Wrappers/Ray/index.html
Module Wrappers.Ray
type t = [ `ray ] Gobject.objval alloc : unit -> tCreate a new Ray
val intersects_triangle : t -> [ `triangle ] Gobject.obj -> boolChecks whether the given #graphene_ray_t @r intersects the given #graphene_triangle_t @b.
See also: graphene_ray_intersect_triangle()
val intersects_sphere : t -> [ `sphere ] Gobject.obj -> boolChecks if the given #graphene_ray_t @r intersects the given #graphene_sphere_t @s.
See also: graphene_ray_intersect_sphere()
val intersects_box : t -> [ `box ] Gobject.obj -> boolChecks whether the given #graphene_ray_t @r intersects the given #graphene_box_t @b.
See also: graphene_ray_intersect_box()
val intersect_triangle :
t ->
[ `triangle ] Gobject.obj ->
Graphene_enums.rayintersectionkind * floatIntersects the given #graphene_ray_t @r with the given #graphene_triangle_t @t.
val intersect_sphere :
t ->
[ `sphere ] Gobject.obj ->
Graphene_enums.rayintersectionkind * floatIntersects the given #graphene_ray_t @r with the given #graphene_sphere_t @s.
val intersect_box :
t ->
[ `box ] Gobject.obj ->
Graphene_enums.rayintersectionkind * floatIntersects the given #graphene_ray_t @r with the given #graphene_box_t @b.
val init_from_vec3 :
t ->
[ `vec3 ] Gobject.obj option ->
[ `vec3 ] Gobject.obj option ->
tInitializes the given #graphene_ray_t using the given vectors.
Initializes the given #graphene_ray_t using the origin and direction values of another #graphene_ray_t.
val init :
t ->
[ `point3_d ] Gobject.obj option ->
[ `vec3 ] Gobject.obj option ->
tInitializes the given #graphene_ray_t using the given @origin and @direction values.
val get_position_at : t -> float -> [ `point3_d ] Gobject.objRetrieves the coordinates of a point at the distance @t along the given #graphene_ray_t.
val get_origin : t -> [ `point3_d ] Gobject.objRetrieves the origin of the given #graphene_ray_t.
val get_distance_to_point : t -> [ `point3_d ] Gobject.obj -> floatComputes 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.
val get_distance_to_plane : t -> [ `plane ] Gobject.obj -> floatComputes 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`.
val get_direction : t -> [ `vec3 ] Gobject.objRetrieves the direction of the given #graphene_ray_t.
val get_closest_point_to_point :
t ->
[ `point3_d ] Gobject.obj ->
[ `point3_d ] Gobject.objComputes the point on the given #graphene_ray_t that is closest to the given point @p.