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

Data.Vector.Transform.Fancy

Description

Generically handle transforms, and things that are transformable.

Synopsis

Documentation

class Transform t whereSource

Class for transforms.

Associated Types

type Point t :: *Source

The type of vector that can be transformed. (E.g., for Transform3, this would be Vector3.)

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 Transform t => Transformable t x whereSource

Class for things that can be transformed (by a specific type of transform).

Methods

transform :: t -> x -> xSource

Transform anything that can be transformed (for a given type of transform).