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/Sphere/index.html

Module Wrappers.Sphere

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

Create a new Sphere

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

Translates the center of the given #graphene_sphere_t using the @point coordinates as the delta of the translation.

val is_empty : t -> bool

Checks whether the sphere has a zero radius.

val init_from_vectors : t -> int -> [ `vec3 ] Gobject.obj array -> [ `point3_d ] Gobject.obj option -> t

Initializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.

The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all @vectors.

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

Initializes the given #graphene_sphere_t using the given array of 3D coordinates so that the sphere includes them.

The center of the sphere can either be specified, or will be center of the 3D volume that encompasses all @points.

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

Initializes the given #graphene_sphere_t with the given @center and @radius.

val get_radius : t -> float

Retrieves the radius of a #graphene_sphere_t.

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

Retrieves the coordinates of the center of a #graphene_sphere_t.

val get_bounding_box : t -> [ `box ] Gobject.obj

Computes the bounding box capable of containing the given #graphene_sphere_t.

val equal : t -> t -> bool

Checks whether two #graphene_sphere_t are equal.

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

Computes the distance of the given @point from the surface of a #graphene_sphere_t.

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

Checks whether the given @point is contained in the volume of a #graphene_sphere_t.