wumpus-basic-0.16.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityhighly unstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Kernel.Objects.Displacement

Contents

Description

Displacing points - often start points.

Synopsis

Moving points and angles

type PointDisplace u = Point2 u -> Point2 uSource

PointDisplace is a type representing functions from Point to Point.

It is especially useful for building composite graphics where one part of the graphic is drawn from a different start point to the other part.

type ThetaDisplace = Radian -> RadianSource

ThetaDisplace is a type representing functions from Radian to Radian.

It is especially useful for building composite graphics where one part of the graphic is drawn from a different start point to the other part.

type ThetaPointDisplace u = Radian -> PointDisplace uSource

ThetaPointDisplace is a type representing functions from Radian * Point to Point.

It is useful for building arrowheads which are constructed with an implicit angle representing the direction of the line at the arrow tip.

moveStart :: PointDisplace u -> LocCF u a -> LocCF u aSource

Move the start-point of a LocCF with the supplied displacement function.

moveStartTheta :: ThetaPointDisplace u -> LocThetaCF u a -> LocThetaCF u aSource

Move the start-point of a LocThetaCF with the supplied displacement function.

moveStartThetaPoint :: PointDisplace u -> LocThetaCF u a -> LocThetaCF u aSource

Move the start-point of a LocThetaCF with the supplied displacement function.

moveStartThetaAngle :: ThetaDisplace -> LocThetaCF u a -> LocThetaCF u aSource

Change the inclination of a LocThetaCF with the supplied displacement function.

displace :: Num u => u -> u -> PointDisplace uSource

displace : x -> y -> PointDisplace

Build a combinator to move Points by the supplied x and y distances.

displaceVec :: Num u => Vec2 u -> PointDisplace uSource

displaceV : (V2 x y) -> PointDisplace

Version of displace where the displacement is supplied as a vector rather than two parameters.

displaceH :: Num u => u -> PointDisplace uSource

displaceH : x -> PointDisplace

Build a combinator to move Points by horizontally the supplied x distance.

displaceV :: Num u => u -> PointDisplace uSource

displaceV : y -> PointDisplace

Build a combinator to move Points vertically by the supplied y distance.

displaceParallel :: Floating u => u -> ThetaPointDisplace uSource

displaceParallel : dist -> ThetaPointDisplace

Build a combinator to move Points in parallel to the direction of the implicit angle by the supplied distance dist.

displacePerpendicular :: Floating u => u -> ThetaPointDisplace uSource

displaceParallel : dist -> ThetaPointDisplace

Build a combinator to move Points perpendicular to the inclnation of the implicit angle by the supplied distance dist.

displaceOrtho :: Floating u => Vec2 u -> ThetaPointDisplace uSource

displaceOrtho : vec -> ThetaPointDisplace

This is a combination of displaceParallel and displacePerpendicular, with the x component of the vector displaced in parallel and the y component displaced perpendicular.