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 Data.VectorSpace
alignXMin :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignXMin = align (negateV unitX)
snugXMin :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugXMin = snug (negateV unitX)
alignXMax :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignXMax = align unitX
snugXMax :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugXMax = snug unitX
alignYMax :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignYMax = align unitY
snugYMax:: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugYMax = snug unitY
alignYMin :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignYMin = align (negateV unitY)
snugYMin :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugYMin = snug (negateV unitY)
alignZMax :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignZMax = align unitZ
snugZMax:: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugZMax = snug unitZ
alignZMin :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
alignZMin = align (negateV unitZ)
snugZMin :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugZMin = snug (negateV unitZ)
alignX :: (Alignable a, HasOrigin a, V a ~ R3) => Double -> a -> a
alignX = alignBy unitX
snugX :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => Double -> a -> a
snugX = snugBy unitX
alignY :: (Alignable a, HasOrigin a, V a ~ R3) => Double -> a -> a
alignY = alignBy unitY
snugY :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => Double -> a -> a
snugY = snugBy unitY
alignZ :: (Alignable a, HasOrigin a, V a ~ R3) => Double -> a -> a
alignZ = alignBy unitZ
snugZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => Double -> a -> a
snugZ = snugBy unitZ
centerX :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerX = alignBy unitX 0
snugCenterX :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterX = snugBy unitX 0
centerY :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerY = alignBy unitY 0
snugCenterY :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterY = snugBy unitY 0
centerZ :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerZ = alignBy unitZ 0
snugCenterZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterZ = snugBy unitZ 0
centerXY :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerXY = centerX . centerY
snugCenterXY :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterXY = snugCenterX . snugCenterY
centerXZ :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerXZ = centerX . centerZ
snugCenterXZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterXZ = snugCenterX . snugCenterZ
centerYZ :: (Alignable a, HasOrigin a, V a ~ R3) => a -> a
centerYZ = centerZ . centerY
snugCenterYZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterYZ = snugCenterZ . snugCenterY
centerXYZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
centerXYZ = centerX . centerY . centerZ
snugCenterXYZ :: (Fractional (Scalar (V a)), Alignable a, Traced a,
HasOrigin a, V a ~ R3) => a -> a
snugCenterXYZ = snugCenterX . snugCenterY . snugCenterZ