| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Game.Scenario.Topography.Placement
Description
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 #
Constructors
| StructureName Text |
Instances
data Orientation Source #
Orientation transformations are applied before translation.
Constructors
| Orientation | |
Fields
| |
Instances
| FromJSON Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement | |
| Show Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement Methods showsPrec :: Int -> Orientation -> ShowS # show :: Orientation -> String # showList :: [Orientation] -> ShowS # | |
| Eq Orientation Source # | |
Defined in Swarm.Game.Scenario.Topography.Placement | |
reorientWaypoint :: Orientation -> AreaDimensions -> Location -> Location Source #
This is the point-wise equivalent of "applyOrientationTransform"
applyOrientationTransform :: Orientation -> [[a]] -> [[a]] Source #
affine transformation