License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Game.Scenario.Topography.Placement
Description
Descriptions of the orientation and offset by which a structure should be placed.
Synopsis
- data Orientation = Orientation {
- up :: AbsoluteDir
- flipped :: Bool
- defaultOrientation :: Orientation
- reorientLandmark :: Orientation -> AreaDimensions -> Location -> Location
- applyOrientationTransform :: Orientation -> Grid a -> Grid a
- applyOrientationTransformNE :: Orientation -> NonEmptyGrid a -> NonEmptyGrid a
- data Pose = Pose {
- offset :: Location
- orient :: Orientation
- data Placement = Placement {}
Documentation
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 |
reorientLandmark :: Orientation -> AreaDimensions -> Location -> Location Source #
This is the point-wise equivalent of "applyOrientationTransform"
applyOrientationTransform :: Orientation -> Grid a -> Grid a Source #
applyOrientationTransformNE :: Orientation -> NonEmptyGrid a -> NonEmptyGrid a Source #
affine transformation
Constructors
Pose | |
Fields
|