sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
S.ValueValues stored in the Rtree.
Values are stored in the Rtree and must provide a means of calculating an envelope (minimal bounding box).
A two-dimensional lines that uses Rectangle as a bounding box could be implemented as
module Line = struct
type t = { p0 : float * float; p1 : float * float }
type envelope = Rtree.Rectangle.t
let equal = Stdlib.( = )
let envelope { p0 = x1, y1; p1 = x2, y2 } =
let x0 = Float.min x1 x2 in
let x1 = Float.max x1 x2 in
let y0 = Float.min y1 y2 in
let y1 = Float.max y1 y2 in
Rtree.Rectangle.v ~x0 ~y0 ~x1 ~y1
endNote that a runtime representation must also be provided.
val pp : Format.formatter -> t -> unitpp fmt v is a pretty printer for values.
type envelope = Envelope.tA type for envelopes in the Rtree.