Source

papl / src / PaplSpatialGroup.mli

Full commit
(*
  Copyright (c) 2012 Anders Lau Olsen.
  See LICENSE file for terms and conditions.
*)

(** Spatial transformation group *)

(** {2 Types} *)

module type S = sig

  type t
  (** The type of a transformation.
  *)

  type vec
  (** The type of a vector. *)

  val interpolate : t PaplInterpolate.t
  (** Interpolation between transformations. *)

  val id : t
  (** The identity transformations.

      [mul id t] and [mul t id] is equivalent to [t] for all transformations
      [t].
  *)

  val mul : t -> t -> t
  (** The product of a pair of transformations.

      [apply (t1 *: t2) v] is equivalent to [apply t1 (apply t2 v)].
  *)

  val inverse : t -> t
  (** The inverse of a transformation.

      [(inverse t) *: t] and [t *: (inverse t)] is equivalent to [id].
  *)

  val apply : t -> vec -> vec
  (** Apply a transformation to vector.
  *)
end