Copyright | (c) 2011 diagrams-lib team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Diagrams.ThreeD.Types
Description
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 Source #
project u v
computes the projection of v
onto u
.
A 3-dimensional vector
Constructors
V3 !a !a !a |
Instances
Representable V3 | |
MonadFix V3 | |
MonadZip V3 | |
Foldable V3 | |
Defined in Linear.V3 Methods fold :: Monoid m => V3 m -> m Source # foldMap :: Monoid m => (a -> m) -> V3 a -> m Source # foldMap' :: Monoid m => (a -> m) -> V3 a -> m Source # foldr :: (a -> b -> b) -> b -> V3 a -> b Source # foldr' :: (a -> b -> b) -> b -> V3 a -> b Source # foldl :: (b -> a -> b) -> b -> V3 a -> b Source # foldl' :: (b -> a -> b) -> b -> V3 a -> b Source # foldr1 :: (a -> a -> a) -> V3 a -> a Source # foldl1 :: (a -> a -> a) -> V3 a -> a Source # toList :: V3 a -> [a] Source # length :: V3 a -> Int Source # elem :: Eq a => a -> V3 a -> Bool Source # maximum :: Ord a => V3 a -> a Source # minimum :: Ord a => V3 a -> a Source # | |
Eq1 V3 | |
Ord1 V3 | |
Read1 V3 | |
Defined in Linear.V3 | |
Show1 V3 | |
Traversable V3 | |
Applicative V3 | |
Functor V3 | |
Monad V3 | |
Serial1 V3 | |
Defined in Linear.V3 Methods 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 | |
Hashable1 V3 | |
Affine V3 | |
Metric V3 | |
Trace V3 | |
Finite V3 | |
R1 V3 | |
R2 V3 | |
R3 V3 | |
Additive V3 | |
Defined in Linear.V3 | |
Apply V3 | |
Bind V3 | |
Foldable1 V3 | |
Traversable1 V3 | |
Num r => Coalgebra r (E V3) | |
Lift a => Lift (V3 a :: Type) | |
Unbox a => Vector Vector (V3 a) | |
Defined in Linear.V3 Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> m (Vector (V3 a)) basicUnsafeThaw :: PrimMonad m => Vector (V3 a) -> m (Mutable Vector (PrimState m) (V3 a)) basicLength :: Vector (V3 a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) basicUnsafeIndexM :: Monad m => Vector (V3 a) -> Int -> m (V3 a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> Vector (V3 a) -> m () | |
Unbox a => MVector MVector (V3 a) | |
Defined in Linear.V3 Methods 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 :: PrimMonad m => Int -> m (MVector (PrimState m) (V3 a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> V3 a -> m (MVector (PrimState m) (V3 a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (V3 a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> V3 a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (V3 a) -> V3 a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (MVector (PrimState m) (V3 a)) | |
Data a => Data (V3 a) | |
Defined in Linear.V3 Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V3 a -> c (V3 a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V3 a) Source # toConstr :: V3 a -> Constr Source # dataTypeOf :: V3 a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V3 a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)) Source # gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> V3 a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> V3 a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) Source # | |
Storable a => Storable (V3 a) | |
Defined in Linear.V3 Methods sizeOf :: V3 a -> Int Source # alignment :: V3 a -> Int Source # peekElemOff :: Ptr (V3 a) -> Int -> IO (V3 a) Source # pokeElemOff :: Ptr (V3 a) -> Int -> V3 a -> IO () Source # peekByteOff :: Ptr b -> Int -> IO (V3 a) Source # pokeByteOff :: Ptr b -> Int -> V3 a -> IO () Source # | |
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) | |
Defined in Linear.V3 | |
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) | |
Defined in Linear.V3 | |
Serialize a => Serialize (V3 a) | |
NFData a => NFData (V3 a) | |
Transformable (V3 n) Source # | |
Coordinates (V3 n) Source # | |
Defined in Diagrams.Coordinates | |
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 | |
Generic1 V3 | |
FoldableWithIndex (E V3) V3 | |
FunctorWithIndex (E V3) V3 | |
TraversableWithIndex (E V3) V3 | |
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 Methods getTrace :: BoundingBox V3 n -> Trace (V (BoundingBox V3 n)) (N (BoundingBox V3 n)) Source # | |
type Rep V3 | |
type Diff V3 | |
Defined in Linear.Affine | |
type Size V3 | |
data MVector s (V3 a) | |
type Rep (V3 a) | |
Defined in Linear.V3 type Rep (V3 a) = D1 ('MetaData "V3" "Linear.V3" "linear-1.21.10-BWYLNa1VYXoLpBTdl1DQBL" '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 Rep1 V3 | |
Defined in Linear.V3 type Rep1 V3 = D1 ('MetaData "V3" "Linear.V3" "linear-1.21.10-BWYLNa1VYXoLpBTdl1DQBL" '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))) |
type T3 = Transformation V3 Source #
class R1 (t :: Type -> Type) where Source #
A space that has at least 1 basis vector _x
.
class R1 t => R2 (t :: Type -> Type) where Source #
Minimal complete definition
Methods
>>>
V2 1 2 ^._y
2
>>>
V2 1 2 & _y .~ 3
V2 1 3
class R2 t => R3 (t :: Type -> Type) where Source #
Instances
R3 Quaternion | |
Defined in Linear.Quaternion | |
R3 V3 | |
R3 V4 | |
R3 f => R3 (Point f) | |