AC-Vector-Fancy-2.3.0: Fancy type-system stuff for AC-Vector

Data.Vector.Transform.Fancy

Description

Generically handle transforms, and things that are transformable.

Synopsis

Documentation

class HasSpace t => Transform t whereSource

Class for transforms.

Methods

transformP :: t -> Point t -> Point tSource

Transform a vector.

translateT :: Point t -> tSource

Build transform: translate by the given vector.

scaleT :: Point t -> tSource

Build transform: scale each coordinate axis according to the given vector.

scaleT_ :: Scalar -> tSource

Build transform: scale all axies uniformly.

class Transform t => Rotate t axis1 axis2 whereSource

Class for performing rotationes. (The rotations that exist vary with the number of spatial dimensions available.)

Methods

rotateT :: Angle a => axis1 -> axis2 -> a Scalar -> tSource

Build transform: rotate in the plane defined by the two axies.

class HasSpace x => Transformable x whereSource

Class for things that can be transformed. Includes instances for all the vector types.

Methods

transform :: (Transform t, Point t ~ Point x) => t -> x -> xSource

Apply a transformation.