Module OgamlGraphics.IndexArray.Source

Represents a source of indices

This module provides a way to store indices in a source before creating an index array.
Note that a source is a mutable structure, therefore add and (<<) will directly modify the source.
Sources are redimensionned as needed when adding indices.

type t
Type of a source of indices
val empty : int -> t
An empty source
val add : t -> int -> unit
Adds an integer index to a source (redimensions the source as needed)
val (<<) : t -> int -> t
Syntaxic sugar for sequences of additions
source << index1 << index2 << index3
val length : t -> int
Returns the length of a source
val append : t -> t -> t
append s1 s2 appends the source s2 at the end of the source s1 (in place), and returns s1 . Raises Invalid_source if types are incompatible.