License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Descriptions of the orientation and offset by which a structure should be placed.
Synopsis
- newtype StructureName = StructureName Text
- data Orientation = Orientation {
- up :: AbsoluteDir
- flipped :: Bool
- defaultOrientation :: Orientation
- reorientWaypoint :: Orientation -> AreaDimensions -> Location -> Location
- applyOrientationTransform :: Orientation -> [[a]] -> [[a]]
- data Placement = Placement {
- src :: StructureName
- offset :: Location
- orient :: Orientation
Documentation
newtype StructureName Source #
Instances
data Orientation Source #
Orientation transformations are applied before translation.
Orientation | |
|
Instances
FromJSON Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement parseJSON :: Value -> Parser Orientation # parseJSONList :: Value -> Parser [Orientation] # | |
Show Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement showsPrec :: Int -> Orientation -> ShowS # show :: Orientation -> String # showList :: [Orientation] -> ShowS # | |
Eq Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement (==) :: Orientation -> Orientation -> Bool # (/=) :: Orientation -> Orientation -> Bool # |
reorientWaypoint :: Orientation -> AreaDimensions -> Location -> Location Source #
This is the point-wise equivalent of "applyOrientationTransform"
applyOrientationTransform :: Orientation -> [[a]] -> [[a]] Source #
affine transformation