{-# LANGUAGE TypeFamilies #-}
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 = align unit_X
snugXMin :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugXMin = snug unit_X
alignXMax :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignXMax = align unitX
snugXMax :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugXMax = snug unitX
alignYMin :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignYMin = align unit_Y
snugYMin :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugYMin = snug unit_Y
alignYMax :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignYMax = align unitY
snugYMax :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugYMax = snug unitY
alignZMin :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignZMin = align unit_Z
snugZMin :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugZMin = snug unit_Z
alignZMax :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
alignZMax = align unitZ
snugZMax :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugZMax = snug unitZ
alignZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => n -> a -> a
alignZ = alignBy unitZ
snugZ :: (V a ~ v, N a ~ n, Alignable a, Traced a, HasOrigin a,
R3 v, Fractional n) => n -> a -> a
snugZ = snugBy unitZ
centerZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerZ = alignBy unitZ 0
snugCenterZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterZ = snugBy unitZ 0
centerXZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerXZ = centerX . centerZ
snugCenterXZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterXZ = snugCenterX . snugCenterZ
centerYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerYZ = centerZ . centerY
snugCenterYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterYZ = snugCenterZ . snugCenterY
centerXYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerXYZ = centerX . centerY . centerZ
snugCenterXYZ :: (InSpace v n a, R3 v, Fractional n, Alignable a, HasOrigin a, Traced a) => a -> a
snugCenterXYZ = snugCenterX . snugCenterY . snugCenterZ