hgeometry:kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

HGeometry.Line.General

Description

An algebraic data type representing a line; we explicitly model vertical lines.

Synopsis

Documentation

data VerticalOrLineEQ r Source #

A line type that explicitly represents vertical lines.

Constructors

VerticalLineThrough !r 
NonVertical !(LineEQ r) 

Instances

Instances details
NFData r => NFData (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Methods

rnf :: VerticalOrLineEQ r -> () #

Generic (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Associated Types

type Rep (VerticalOrLineEQ r) 
Instance details

Defined in HGeometry.Line.General

type Rep (VerticalOrLineEQ r) = D1 ('MetaData "VerticalOrLineEQ" "HGeometry.Line.General" "hgeometry-1.0.0.0-inplace-kernel" 'False) (C1 ('MetaCons "VerticalLineThrough" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 r)) :+: C1 ('MetaCons "NonVertical" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LineEQ r))))
Show r => Show (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Eq r => Eq (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Ord r => Ord (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

HasOnLine (VerticalOrLineEQ r) 2 Source # 
Instance details

Defined in HGeometry.Line.General

Methods

onLine :: (Point_ point 2 r0, Num r0, Eq r0, r0 ~ NumType (VerticalOrLineEQ r), 2 ~ Dimension (VerticalOrLineEQ r)) => point -> VerticalOrLineEQ r -> Bool Source #

(Fractional r, Eq r) => ConstructableHyperPlane_ (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

Associated Types

type HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r 
Instance details

Defined in HGeometry.Line.General

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> VerticalOrLineEQ r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> VerticalOrLineEQ r Source #

HyperPlane_ (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

Methods

evalHyperPlaneEquation :: (Num r, Point_ point 2 r) => VerticalOrLineEQ r -> point -> r Source #

hyperPlaneEquation :: VerticalOrLineEQ r -> Vector (2 + 1) r Source #

normalVector :: VerticalOrLineEQ r -> Vector 2 r Source #

onHyperPlane :: (Point_ point 2 r, Eq r, Num r) => point -> VerticalOrLineEQ r -> Bool Source #

onSideTest :: (Point_ point 2 r, Ord r, Num r) => point -> VerticalOrLineEQ r -> Ordering Source #

(Fractional r, Eq r) => Line_ (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

Methods

fromPointAndVec :: (Point_ point 2 r, Line_ (VerticalOrLineEQ r) 2 r, Num r) => point -> Vector 2 r -> VerticalOrLineEQ r Source #

(Num r, Ord r, Point_ point 2 r) => HasIntersectionWith (VerticalOrLineEQ r) (Rectangle point) Source # 
Instance details

Defined in HGeometry.Box

Eq r => HasIntersectionWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Eq r => HasIntersectionWith (LineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

(Fractional r, Ord r, Point_ point 2 r) => IsIntersectableWith (VerticalOrLineEQ r) (Rectangle point) Source # 
Instance details

Defined in HGeometry.Box

(Eq r, Fractional r) => IsIntersectableWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

(Eq r, Fractional r) => IsIntersectableWith (LineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

Eq r => HasIntersectionWith (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') Source # 
Instance details

Defined in HGeometry.Line.General

Methods

intersects :: (VerticalOrLineEQ r :+ extra) -> (VerticalOrLineEQ r :+ extra') -> Bool Source #

(Eq r, Fractional r) => IsIntersectableWith (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') Source # 
Instance details

Defined in HGeometry.Line.General

Methods

intersect :: (VerticalOrLineEQ r :+ extra) -> (VerticalOrLineEQ r :+ extra') -> Intersection (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') Source #

type Rep (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

type Rep (VerticalOrLineEQ r) = D1 ('MetaData "VerticalOrLineEQ" "HGeometry.Line.General" "hgeometry-1.0.0.0-inplace-kernel" 'False) (C1 ('MetaCons "VerticalLineThrough" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 r)) :+: C1 ('MetaCons "NonVertical" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LineEQ r))))
type Dimension (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

type Dimension (VerticalOrLineEQ r) = 2
type NumType (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

type NumType (VerticalOrLineEQ r) = r
type HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

type Intersection (VerticalOrLineEQ r) (Rectangle point) Source # 
Instance details

Defined in HGeometry.Box

type Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

type Intersection (LineEQ r) (VerticalOrLineEQ r) Source # 
Instance details

Defined in HGeometry.Line.General

type Intersection (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') Source # 
Instance details

Defined in HGeometry.Line.General