data-r-tree-0.0.5.0: R-Tree is a spatial data structure similar to Quadtrees or B-Trees.

Portabilitynot portable
Stabilityexperimental
MaintainerBirte Wagner, Sebastian Philipp (sebastian@spawnhost.de)
Safe HaskellSafe-Inferred

Data.RTree.MBB

Description

This module provides a minimal bounding box.

Synopsis

Documentation

data MBB Source

Minimal bounding box

Constructors

MBB 

Fields

getUlx :: !Double
 
getUly :: !Double
 
getBrx :: !Double
 
getBry :: !Double
 

Instances

mbbSource

Arguments

:: Double

x - coordinate of first point

-> Double

y - coordinate of first point

-> Double

x - coordinate of second point

-> Double

x - coordinate of second point

-> MBB 

created a minimal bounding box (or a rectangle) The first point must be smaller, than the second one. This is unchecked.

area :: MBB -> DoubleSource

calculates the area of the rect

containsMBB :: MBB -> MBB -> BoolSource

returns True, when the first mbb contains the secons

unionMBB :: MBB -> MBB -> MBBSource

unifies two MBBs into one

unionsMBB :: [MBB] -> MBBSource

internal only.

intersectMBB :: MBB -> MBB -> Maybe MBBSource

returns the intersection of both mbbs. Returns Nothing, if they don't intersect.