module Diagrams.ThreeD.Vector
(
unitX, unitY, unitZ, unit_X, unit_Y, unit_Z
, xDir, yDir, zDir
) where
import Control.Lens ((&), (.~))
import Diagrams.ThreeD.Types
import Diagrams.TwoD.Vector
import Diagrams.Direction
import Linear.Vector
unitZ :: (R3 v, Additive v, Num n) => v n
unitZ :: forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ = v n
forall a. Num a => v a
forall (f :: * -> *) a. (Additive f, Num a) => f a
zero v n -> (v n -> v n) -> v n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> v n -> Identity (v n)
forall a. Lens' (v a) a
forall (t :: * -> *) a. R3 t => Lens' (t a) a
_z ((n -> Identity n) -> v n -> Identity (v n)) -> n -> v n -> v n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ n
1
unit_Z :: (R3 v, Additive v, Num n) => v n
unit_Z :: forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unit_Z = v n
forall a. Num a => v a
forall (f :: * -> *) a. (Additive f, Num a) => f a
zero v n -> (v n -> v n) -> v n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> v n -> Identity (v n)
forall a. Lens' (v a) a
forall (t :: * -> *) a. R3 t => Lens' (t a) a
_z ((n -> Identity n) -> v n -> Identity (v n)) -> n -> v n -> v n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ (-n
1)
zDir :: (R3 v, Additive v, Num n) => Direction v n
zDir :: forall (v :: * -> *) n. (R3 v, Additive v, Num n) => Direction v n
zDir = v n -> Direction v n
forall (v :: * -> *) n. v n -> Direction v n
dir v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ