{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Diagrams.ThreeD.Align
(
alignXMin, alignXMax, alignYMin, alignYMax, alignZMin, alignZMax
, snugXMin, snugXMax, snugYMin, snugYMax, snugZMin, snugZMax
, alignX, snugX, alignY, snugY, alignZ, snugZ
, centerX, centerY, centerZ
, centerXY, centerXZ, centerYZ, centerXYZ
, snugCenterX, snugCenterY, snugCenterZ
, snugCenterXY, snugCenterXZ, snugCenterYZ, snugCenterXYZ
) where
import Diagrams.Core
import Diagrams.Align
import Diagrams.ThreeD.Types
import Diagrams.ThreeD.Vector
import Diagrams.TwoD.Align
alignXMin :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignXMin :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignXMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unit_X
snugXMin :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugXMin :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugXMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unit_X
alignXMax :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignXMax :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignXMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
snugXMax :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugXMax :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugXMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
alignYMin :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignYMin :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignYMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
snugYMin :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugYMin :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugYMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
alignYMax :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignYMax :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignYMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
snugYMax :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugYMax :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugYMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
alignZMin :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignZMin :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignZMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unit_Z
snugZMin :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugZMin :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugZMin = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unit_Z
alignZMax :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignZMax :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignZMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ
snugZMax :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugZMax :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugZMax = v n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ
alignZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => n -> a -> a
alignZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
n -> a -> a
alignZ = v n -> n -> a -> a
forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
forall (v :: * -> *) n.
(InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ
snugZ :: (V a ~ v, N a ~ n, Alignable a, Traced a, HasOrigin a,
R3 v, Fractional n) => n -> a -> a
snugZ :: forall a (v :: * -> *) n.
(V a ~ v, N a ~ n, Alignable a, Traced a, HasOrigin a, R3 v,
Fractional n) =>
n -> a -> a
snugZ = v n -> n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ
centerZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerZ = v n -> n -> a -> a
forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
forall (v :: * -> *) n.
(InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ n
0
snugCenterZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterZ = v n -> n -> a -> a
forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy v n
forall (v :: * -> *) n. (R3 v, Additive v, Num n) => v n
unitZ n
0
centerXZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerXZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerXZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerX (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerZ
snugCenterXZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterXZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterXZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterX (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterZ
centerYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerYZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerYZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerZ (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerY
snugCenterYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterYZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterYZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterZ (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterY
centerXYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerXYZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerXYZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerX (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerY (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerZ
snugCenterXYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterXYZ :: forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterXYZ = a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterX (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterY (a -> a) -> (a -> a) -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
forall (v :: * -> *) n a.
(InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a,
Traced a) =>
a -> a
snugCenterZ