AC-Vector-Fancy-2.1.2: Fancy type system stuff for AC-VectorSource codeContentsIndex
Data.Vector.Transform.Fancy
Description
Generically handle transforms, and things that are transformable.
Synopsis
class Transform t where
type Point t :: *
transformP :: t -> Point t -> Point t
translateT :: Point t -> t
scaleT :: Point t -> t
scaleT_ :: Scalar -> t
class Transform t => Rotate t axis1 axis2 where
rotateT :: Angle a => axis1 -> axis2 -> a Scalar -> t
class Transform t => Transformable t x where
transform :: t -> x -> x
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.
show/hide Instances
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.
show/hide Instances
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).
show/hide Instances
Produced by Haddock version 2.6.1