This module provides the BBox3
type for 3-dimensional bounding boxes ("bounding volumes").
- data BBox3 = BBox3 {}
- rangeX :: BBox3 -> Range
- rangeY :: BBox3 -> Range
- rangeZ :: BBox3 -> Range
- rangeXYZ :: Range -> Range -> Range -> BBox3
- bounds :: Vector3 -> Vector3 -> BBox3
- within_bounds :: Vector3 -> BBox3 -> Bool
- min_bound :: BBox3 -> Vector3
- max_bound :: BBox3 -> Vector3
- union :: BBox3 -> BBox3 -> BBox3
- isect :: BBox3 -> BBox3 -> Maybe BBox3
Documentation
rangeXYZ :: Range -> Range -> Range -> BBox3Source
Given ranges for each coordinate axis, construct a bounding box.
bounds :: Vector3 -> Vector3 -> BBox3Source
Given a pair of corner points, construct a bounding box. (The points must be from opposite corners, but it doesn't matter which corners nor which order they are given in.)
within_bounds :: Vector3 -> BBox3 -> BoolSource
Test whether a given 3D vector is inside this bounding box.