package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.graphene/Ocgtk_graphene/Graphene/Wrappers/Plane/index.html

Module Wrappers.Plane

type t = [ `plane ] Gobject.obj
val alloc : unit -> t

Create a new Plane

val transform : t -> [ `matrix ] Gobject.obj -> [ `matrix ] Gobject.obj option -> t

Transforms a #graphene_plane_t @p using the given @matrix and @normal_matrix.

If @normal_matrix is %NULL, a transformation matrix for the plane normal will be computed from @matrix. If you are transforming multiple planes using the same @matrix it's recommended to compute the normal matrix beforehand to avoid incurring in the cost of recomputing it every time.

val normalize : t -> t

Normalizes the vector of the given #graphene_plane_t, and adjusts the constant accordingly.

val negate : t -> t

Negates the normal vector and constant of a #graphene_plane_t, effectively mirroring the plane across the origin.

val init_from_vec4 : t -> [ `vec4 ] Gobject.obj -> t

Initializes the given #graphene_plane_t using the components of the given #graphene_vec4_t vector.

val init_from_points : t -> [ `point3_d ] Gobject.obj -> [ `point3_d ] Gobject.obj -> [ `point3_d ] Gobject.obj -> t

Initializes the given #graphene_plane_t using the 3 provided co-planar points.

The winding order is counter-clockwise, and determines which direction the normal vector will point.

val init_from_point : t -> [ `vec3 ] Gobject.obj -> [ `point3_d ] Gobject.obj -> t

Initializes the given #graphene_plane_t using the given normal vector and an arbitrary co-planar point.

val init_from_plane : t -> t -> t

Initializes the given #graphene_plane_t using the normal vector and constant of another #graphene_plane_t.

val init : t -> [ `vec3 ] Gobject.obj option -> float -> t

Initializes the given #graphene_plane_t using the given @normal vector and @constant values.

val get_normal : t -> [ `vec3 ] Gobject.obj

Retrieves the normal vector pointing towards the origin of the given #graphene_plane_t.

val get_constant : t -> float

Retrieves the distance along the normal vector of the given #graphene_plane_t from the origin.

val equal : t -> t -> bool

Checks whether the two given #graphene_plane_t are equal.

val distance : t -> [ `point3_d ] Gobject.obj -> float

Computes the distance of @point from a #graphene_plane_t.