Copyright | (c) 2011 diagrams-lib team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Basic types for three-dimensional Euclidean space.
Synopsis
- r3 :: (n, n, n) -> V3 n
- unr3 :: V3 n -> (n, n, n)
- mkR3 :: n -> n -> n -> V3 n
- p3 :: (n, n, n) -> P3 n
- unp3 :: P3 n -> (n, n, n)
- mkP3 :: n -> n -> n -> P3 n
- r3Iso :: Iso' (V3 n) (n, n, n)
- p3Iso :: Iso' (P3 n) (n, n, n)
- project :: (Metric v, Fractional a) => v a -> v a -> v a
- r3SphericalIso :: RealFloat n => Iso' (V3 n) (n, Angle n, Angle n)
- r3CylindricalIso :: RealFloat n => Iso' (V3 n) (n, Angle n, n)
- data V3 a = V3 !a !a !a
- type P3 = Point V3
- type T3 = Transformation V3
- class R1 (t :: Type -> Type) where
- class R1 t => R2 (t :: Type -> Type) where
- class R2 t => R3 (t :: Type -> Type) where
3D Euclidean space
project :: (Metric v, Fractional a) => v a -> v a -> v a #
project u v
computes the projection of v
onto u
.
A 3-dimensional vector
V3 !a !a !a |
Instances
Representable V3 | |
MonadFix V3 | |
MonadZip V3 | |
Foldable V3 | |
Defined in Linear.V3 fold :: Monoid m => V3 m -> m # foldMap :: Monoid m => (a -> m) -> V3 a -> m # foldMap' :: Monoid m => (a -> m) -> V3 a -> m # foldr :: (a -> b -> b) -> b -> V3 a -> b # foldr' :: (a -> b -> b) -> b -> V3 a -> b # foldl :: (b -> a -> b) -> b -> V3 a -> b # foldl' :: (b -> a -> b) -> b -> V3 a -> b # foldr1 :: (a -> a -> a) -> V3 a -> a # foldl1 :: (a -> a -> a) -> V3 a -> a # elem :: Eq a => a -> V3 a -> Bool # maximum :: Ord a => V3 a -> a # | |
Eq1 V3 | |
Ord1 V3 | |
Read1 V3 | |
Show1 V3 | |
Traversable V3 | |
Applicative V3 | |
Functor V3 | |
Monad V3 | |
Serial1 V3 | |
Defined in Linear.V3 serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () # deserializeWith :: MonadGet m => m a -> m (V3 a) # | |
HasPhi V3 Source # | |
HasTheta V3 Source # | |
HasR V3 Source # | |
Distributive V3 | |
Foldable1 V3 | |
Defined in Linear.V3 fold1 :: Semigroup m => V3 m -> m # foldMap1 :: Semigroup m => (a -> m) -> V3 a -> m # foldMap1' :: Semigroup m => (a -> m) -> V3 a -> m # toNonEmpty :: V3 a -> NonEmpty a # maximum :: Ord a => V3 a -> a # minimum :: Ord a => V3 a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> V3 a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> V3 a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> V3 a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> V3 a -> b # | |
Hashable1 V3 | |
Affine V3 | |
Metric V3 | |
Trace V3 | |
Finite V3 | |
R1 V3 | |
R2 V3 | |
R3 V3 | |
Additive V3 | |
Apply V3 | |
Bind V3 | |
Traversable1 V3 | |
Generic1 V3 | |
Num r => Coalgebra r (E V3) | |
Unbox a => Vector Vector (V3 a) | |
Defined in Linear.V3 basicUnsafeFreeze :: Mutable Vector s (V3 a) -> ST s (Vector (V3 a)) # basicUnsafeThaw :: Vector (V3 a) -> ST s (Mutable Vector s (V3 a)) # basicLength :: Vector (V3 a) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) # basicUnsafeIndexM :: Vector (V3 a) -> Int -> Box (V3 a) # basicUnsafeCopy :: Mutable Vector s (V3 a) -> Vector (V3 a) -> ST s () # | |
Unbox a => MVector MVector (V3 a) | |
Defined in Linear.V3 basicLength :: MVector s (V3 a) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) # basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool # basicUnsafeNew :: Int -> ST s (MVector s (V3 a)) # basicInitialize :: MVector s (V3 a) -> ST s () # basicUnsafeReplicate :: Int -> V3 a -> ST s (MVector s (V3 a)) # basicUnsafeRead :: MVector s (V3 a) -> Int -> ST s (V3 a) # basicUnsafeWrite :: MVector s (V3 a) -> Int -> V3 a -> ST s () # basicClear :: MVector s (V3 a) -> ST s () # basicSet :: MVector s (V3 a) -> V3 a -> ST s () # basicUnsafeCopy :: MVector s (V3 a) -> MVector s (V3 a) -> ST s () # basicUnsafeMove :: MVector s (V3 a) -> MVector s (V3 a) -> ST s () # basicUnsafeGrow :: MVector s (V3 a) -> Int -> ST s (MVector s (V3 a)) # | |
Data a => Data (V3 a) | |
Defined in Linear.V3 gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V3 a -> c (V3 a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V3 a) # dataTypeOf :: V3 a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V3 a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)) # gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r # gmapQ :: (forall d. Data d => d -> u) -> V3 a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> V3 a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) # | |
Storable a => Storable (V3 a) | |
Monoid a => Monoid (V3 a) | |
Semigroup a => Semigroup (V3 a) | |
Bounded a => Bounded (V3 a) | |
Floating a => Floating (V3 a) | |
Generic (V3 a) | |
Ix a => Ix (V3 a) | |
Num a => Num (V3 a) | |
Read a => Read (V3 a) | |
Fractional a => Fractional (V3 a) | |
Show a => Show (V3 a) | |
Binary a => Binary (V3 a) | |
Serial a => Serial (V3 a) | |
Serialize a => Serialize (V3 a) | |
NFData a => NFData (V3 a) | |
Transformable (V3 n) Source # | |
Defined in Diagrams.ThreeD.Types | |
Coordinates (V3 n) Source # | |
Eq a => Eq (V3 a) | |
Ord a => Ord (V3 a) | |
Hashable a => Hashable (V3 a) | |
Ixed (V3 a) | |
Epsilon a => Epsilon (V3 a) | |
Random a => Random (V3 a) | |
Unbox a => Unbox (V3 a) | |
Defined in Linear.V3 | |
FoldableWithIndex (E V3) V3 | |
FunctorWithIndex (E V3) V3 | |
TraversableWithIndex (E V3) V3 | |
Lift a => Lift (V3 a :: Type) | |
Each (V3 a) (V3 b) a b | |
Field1 (V3 a) (V3 a) a a | |
Field2 (V3 a) (V3 a) a a | |
Field3 (V3 a) (V3 a) a a | |
TypeableFloat n => Traced (BoundingBox V3 n) Source # | |
Defined in Diagrams.BoundingBox getTrace :: BoundingBox V3 n -> Trace (V (BoundingBox V3 n)) (N (BoundingBox V3 n)) # | |
type Rep V3 | |
type Diff V3 | |
Defined in Linear.Affine | |
type Size V3 | |
type Rep1 V3 | |
Defined in Linear.V3 type Rep1 V3 = D1 ('MetaData "V3" "Linear.V3" "linear-1.22-72pkVCpgLGx9nMqunWhEkn" 'False) (C1 ('MetaCons "V3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))) | |
data MVector s (V3 a) | |
type Rep (V3 a) | |
Defined in Linear.V3 type Rep (V3 a) = D1 ('MetaData "V3" "Linear.V3" "linear-1.22-72pkVCpgLGx9nMqunWhEkn" 'False) (C1 ('MetaCons "V3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))) | |
type N (V3 n) Source # | |
Defined in Diagrams.ThreeD.Types | |
type V (V3 n) Source # | |
Defined in Diagrams.ThreeD.Types | |
type Decomposition (V3 n) Source # | |
Defined in Diagrams.Coordinates | |
type FinalCoord (V3 n) Source # | |
Defined in Diagrams.Coordinates | |
type PrevDim (V3 n) Source # | |
Defined in Diagrams.Coordinates | |
type Index (V3 a) | |
type IxValue (V3 a) | |
data Vector (V3 a) | |
type T3 = Transformation V3 Source #
class R1 (t :: Type -> Type) where #
A space that has at least 1 basis vector _x
.
class R2 t => R3 (t :: Type -> Type) where #
Instances
R3 Quaternion | |
Defined in Linear.Quaternion _z :: Lens' (Quaternion a) a # _xyz :: Lens' (Quaternion a) (V3 a) # | |
R3 V3 | |
R3 V4 | |
R3 f => R3 (Point f) | |