package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Point3_d

type t = [ `point3_d ] Gobject.obj

A point with three components: X, Y, and Z.

val alloc : unit -> t

Create a new Point3D

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

Stores the coordinates of a #graphene_point3d_t into a #graphene_vec3_t.

val scale : t -> float -> t

Scales the coordinates of the given #graphene_point3d_t by the given @factor.

val normalize_viewport : t -> [ `rect ] Gobject.obj -> float -> float -> t

Normalizes the coordinates of a #graphene_point3d_t using the given viewport and clipping planes.

The coordinates of the resulting #graphene_point3d_t will be in the -1, 1 range.

val normalize : t -> t

Computes the normalization of the vector represented by the coordinates of the given #graphene_point3d_t.

val near : t -> t -> float -> bool

Checks whether the two points are near each other, within an @epsilon factor.

val length : t -> float

Computes the length of the vector represented by the coordinates of the given #graphene_point3d_t.

val interpolate : t -> t -> float -> t

Linearly interpolates each component of @a and @b using the provided @factor, and places the result in @res.

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

Initializes a #graphene_point3d_t using the components of a #graphene_vec3_t.

val init_from_point : t -> t -> t

Initializes a #graphene_point3d_t using the coordinates of another #graphene_point3d_t.

val init : t -> float -> float -> float -> t

Initializes a #graphene_point3d_t with the given coordinates.

val equal : t -> t -> bool

Checks whether two given points are equal.

val dot : t -> t -> float

Computes the dot product of the two given #graphene_point3d_t.

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

Computes the distance between the two given #graphene_point3d_t.

val cross : t -> t -> t

Computes the cross product of the two given #graphene_point3d_t.

val get_type : unit -> Gobject.Type.t