hgeometry-kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.Box.Boxable

Description

Typeclass that expresses that we can compute an axis parallel bounding box of an object.

Synopsis

Documentation

class IsBoxable g where Source #

Types for which we can compute an axis parallel boundingbox

Minimal complete definition

Nothing

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension g, r ~ NumType g, Ord r) => g -> Box (Point d r) Source #

Compute the axis-parallel boundingbox of the given geometry.

default boundingBox :: forall (d :: Nat) r point. (d ~ Dimension g, r ~ NumType g, Ord r, HasPoints' g point, Point_ point d r, Ord (Vector d r)) => g -> Box (Point d r) Source #

Instances

Instances details
(IsBoxable g, Has_ Additive_ d r, d ~ Dimension g, r ~ NumType g) => IsBoxable (NonEmpty g) Source # 
Instance details

Defined in HGeometry.Box.Boxable

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (NonEmpty g), r0 ~ NumType (NonEmpty g), Ord r0) => NonEmpty g -> Box (Point d0 r0) Source #

(Box_ (Box point) point, Point_ point d r) => IsBoxable (Box point) Source # 
Instance details

Defined in HGeometry.Box.Boxable

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (Box point), r0 ~ NumType (Box point), Ord r0) => Box point -> Box (Point d0 r0) Source #

(Point_ point d r, Ord (Vector d r)) => IsBoxable (Triangle point) Source # 
Instance details

Defined in HGeometry.Triangle

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (Triangle point), r0 ~ NumType (Triangle point), Ord r0) => Triangle point -> Box (Point d0 r0) Source #

IsBoxable g => IsBoxable (g :+ extra) Source # 
Instance details

Defined in HGeometry.Box.Boxable

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (g :+ extra), r ~ NumType (g :+ extra), Ord r) => (g :+ extra) -> Box (Point d r) Source #

(Traversable1 endPoint, Point_ point d r, d ~ Dimension point, r ~ NumType point, Ord r, Ord (Vector d r)) => IsBoxable (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (LineSegment endPoint point), r0 ~ NumType (LineSegment endPoint point), Ord r0) => LineSegment endPoint point -> Box (Point d0 r0) Source #

IsBoxable (Point d r) Source # 
Instance details

Defined in HGeometry.Box.Boxable

Methods

boundingBox :: forall (d0 :: Nat) r0. (d0 ~ Dimension (Point d r), r0 ~ NumType (Point d r), Ord r0) => Point d r -> Box (Point d0 r0) Source #

newtype Union point Source #

Constructors

Union 

Fields

Instances

Instances details
(Point_ point d r, Ord r) => Semigroup (Union point) Source # 
Instance details

Defined in HGeometry.Box.Boxable

Methods

(<>) :: Union point -> Union point -> Union point Source #

sconcat :: NonEmpty (Union point) -> Union point Source #

stimes :: Integral b => b -> Union point -> Union point Source #