Idris2Doc : Geom.Bounds

Geom.Bounds

(source)

Definitions

dataBounds : Type
  Bounds along one axis in an affine space

Totality: total
Visibility: export
Constructors:
Empty : Bounds
  Bounds without extent. Contains no points.
Rng : Double->Double->Bounds
  Concrete bounds.

Hints:
MonoidBounds
SemigroupBounds
getBounds : Bounds->Maybe (Double, Double)
  Extract the inner structure of a `Bounds` values.

Mostly useful for debugging.

Totality: total
Visibility: export
empty : Bounds
  The empty bounds.

Totality: total
Visibility: export
val : Double->Bounds
  A single point on an axis.

Totality: total
Visibility: export
range : Double->Double->Bounds
  the range between two points on a line

Totality: total
Visibility: export
expand : Bounds->Bounds->Bounds
  Return the smallest `Bounds` containing all points in both
argument bounds.

Totality: total
Visibility: export
inBounds1D : {default0.0_ : Double} ->Double->Bounds->Bool
  Checks if a value is within the given bounds.

Totality: total
Visibility: export
middle : Bounds->MaybeDouble
  Computes the middle (center) of a range. Returns `Nothing` if the `Bounds`
are empty.

Totality: total
Visibility: export
width : Bounds->Double
  Computes the width of some bounds. Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
halfWidth : Bounds->Double
  Computes half of the width of some bounds.
Returns `0` if the `Bounds` are empty

Totality: total
Visibility: export
overlap : {default0.0_ : Double} ->Bounds->Bounds->Bounds
  Compounds the overlapping region between two bounds in
one direction.

Totality: total
Visibility: export
recordBounds2D : AffineTransformation->Type
  Bounds in two dimensions.

Totality: total
Visibility: public export
Constructor: 
BS : Bounds->Bounds->Bounds2Dt

Projections:
.x : Bounds2Dt->Bounds
.y : Bounds2Dt->Bounds

Hints:
Bounded (Bounds2Dt)
Monoid (Bounds2Dt)
Semigroup (Bounds2Dt)
.x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
x : Bounds2Dt->Bounds
Totality: total
Visibility: public export
.y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
y : Bounds2Dt->Bounds
Totality: total
Visibility: public export
width : Bounds2Dt->Double
Totality: total
Visibility: export
height : Bounds2Dt->Double
Totality: total
Visibility: export
overlap : {default0.0_ : Double} ->Bounds2Dt->Bounds2Dt->Bounds2Dt
  Computes the overlapping rectangle between 2D bounds.

Totality: total
Visibility: export
inBounds : {default0.0_ : Double} ->Pointt->Bounds2Dt->Bool
  Checks, if the point is in within some bounds in its affine space
by two points.

Totality: total
Visibility: export
corners : Bounds2Dt->Maybe (Pointt, Pointt)
  Return the corners of a bounding rectangle (if any)

Totality: total
Visibility: export
interfaceBounded : Type->Type
Parameters: a
Constructor: 
BD

Methods:
btrans : AffineTransformation
bounds : a->Bounds2Dbtrans

Implementations:
Bounded (Bounds2Dt)
Foldablef=>Boundeda=>Bounded (fa)
GetPointa=>Boundeda
BoundedRect
btrans : Boundeda=>AffineTransformation
Totality: total
Visibility: public export
bounds : {auto__con : Boundeda} ->a->Bounds2Dbtrans
Totality: total
Visibility: public export
convertBounds : Bounds2Ds->Bounds2Dt
Totality: total
Visibility: export
center : {autob : Boundeda} ->a->Pointbtrans
  Calculates the center in a collection of bounded values.

Returns the origin in case of an object with empty bounds.

Totality: total
Visibility: export
inRectangle : Pointt->Pointt->Pointt->Bool
  Checks, if the point is in or on the line of a rectangel defined
by two points.

Totality: total
Visibility: export
translatePositive : ModPointa=>Boundeda=>a->a
  Translates a bounded value so that the lower-left corner of its
bound will come to lie at the origin.

Totality: total
Visibility: export
distanceToLineSegment : Pointt->Pointt->Pointt->Double
  Computes the distance of a point `p` from the line segment
between points `pl1` and `pl2`.

Totality: total
Visibility: export
recordPackParams : Type
Totality: total
Visibility: public export
Constructor: 
PP : Double->Double->Nat->Double->PackParams

Projections:
.gapX : PackParams->Double
  Horizontal gap between adjacent rectangles
.gapY : PackParams->Double
  Vertical gap between adjacent rectangles
.iter : PackParams->Nat
  Maximum number of iterations used in the binary search
to find the ideal packaging size
.ratio : PackParams->Double
  Width-to-height ratio used when aligning the containers
.gapX : PackParams->Double
  Horizontal gap between adjacent rectangles

Totality: total
Visibility: public export
gapX : PackParams->Double
  Horizontal gap between adjacent rectangles

Totality: total
Visibility: public export
.gapY : PackParams->Double
  Vertical gap between adjacent rectangles

Totality: total
Visibility: public export
gapY : PackParams->Double
  Vertical gap between adjacent rectangles

Totality: total
Visibility: public export
.iter : PackParams->Nat
  Maximum number of iterations used in the binary search
to find the ideal packaging size

Totality: total
Visibility: public export
iter : PackParams->Nat
  Maximum number of iterations used in the binary search
to find the ideal packaging size

Totality: total
Visibility: public export
.ratio : PackParams->Double
  Width-to-height ratio used when aligning the containers

Totality: total
Visibility: public export
ratio : PackParams->Double
  Width-to-height ratio used when aligning the containers

Totality: total
Visibility: public export
align : {defaultdflt_ : PackParams} ->Boundeda=>ModPointa=>Lista->Lista
  Packs rectangular objects in a grid using a guillotine cutting
algorithm.

The minimal size of the rectangle required to pack the items is
computed via a binary search (maximum number of iterations is
given via the `PackParams` argument).

Gap sizes in both directions can be specified by the provided
`PackParams` argument.

Totality: total
Visibility: export