Copyright | (C) 2017 Maksymilian Owsianny |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Maksymilian.Owsianny@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
General representation of a plane. Plane in the General Form is Hession Normal Form scaled by an arbitrary non-zero scalar.
- data Plane v n = Plane {
- planeVector :: !(v n)
- planeLast :: !n
- type Plane2 = Plane V2
- type Plane3 = Plane V3
- type Plane2D = Plane V2 Double
- type Plane3D = Plane V3 Double
- class MakePlane v n where
- unsafeMakePlane :: MakePlane v n => v (Point v n) -> Plane v n
- flipPlane :: (Functor v, Num n) => Plane v n -> Plane v n
- collinear :: (Foldable v, Num n, EqZero n) => v n -> v n -> Bool
- data PlanesRelation
- data Incidence
- data Orientation
- planesRelation :: (Foldable v, Num n, Ord n, EqZero n) => Plane v n -> Plane v n -> PlanesRelation
- isParallel :: (Foldable v, Num n, Ord n, EqZero n) => Plane v n -> Plane v n -> Bool
Documentation
Internally Plane is represented as a pair (sN, sO) where N is a normal vector of a plane O is the distance of that plane from the origin and s is an arbitrary non-zero scalar.
Plane | |
|
ToPolytopeRep PolyT3 (FB3 v n) v n Source # | |
(MakePlane v n, Eq (v n), Foldable v, Applicative v, R3 v, Num n, Ord n, EqZero n) => FromPolytopeRep Poly3 (FB3 v n) v n Source # | |
(Eq (v n), Eq n) => Eq (Plane v n) Source # | |
(Ord (v n), Ord n) => Ord (Plane v n) Source # | |
(Show (v n), Show n) => Show (Plane v n) Source # | |
(NFData (v n), NFData n) => NFData (Plane v n) Source # | |
(MakeCrossPoint v n, R3 v, Applicative v, Foldable v, Num n, Ord n, EqZero n) => Clip (FB3 v n) v n Source # | |
(Ord n, Fractional n, EqZero n) => Universe (FB3 V3 n) V3 n Source # | |
unsafeMakePlane :: MakePlane v n => v (Point v n) -> Plane v n Source #
Assumes that points form a valid plane (i.e. vectors between all points are linearly independent).
collinear :: (Foldable v, Num n, EqZero n) => v n -> v n -> Bool Source #
Test whether two vectors are collinear.
planesRelation :: (Foldable v, Num n, Ord n, EqZero n) => Plane v n -> Plane v n -> PlanesRelation Source #
Relate two planes on Parallelism, Incidence and Orientation.