flaw-math-0.1.0.0

LicenseMIT
Safe HaskellTrustworthy
LanguageHaskell2010

Flaw.Math.Transform

Contents

Description

 
Synopsis

Transform class

class Transform t where Source #

Instances
Transform Mat4x4 Source # 
Instance details

Defined in Flaw.Math.Transform

Transform DualQuat Source # 
Instance details

Defined in Flaw.Math.Transform

Transform QuatOffset Source # 
Instance details

Defined in Flaw.Math.Transform

Quaternion plus offset

data QuatOffset a Source #

3D transformation represented by normalized quaternion and offset.

Constructors

QuatOffset (Quat a) (Vec3 a) 
Instances
Transform QuatOffset Source # 
Instance details

Defined in Flaw.Math.Transform

Quaternionized a => Eq (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

(==) :: QuatOffset a -> QuatOffset a -> Bool #

(/=) :: QuatOffset a -> QuatOffset a -> Bool #

Quaternionized a => Ord (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Quaternionized a => Show (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Generic (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Associated Types

type Rep (QuatOffset a) :: Type -> Type #

Methods

from :: QuatOffset a -> Rep (QuatOffset a) x #

to :: Rep (QuatOffset a) x -> QuatOffset a #

(Quaternionized a, Storable a) => Storable (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

sizeOf :: QuatOffset a -> Int #

alignment :: QuatOffset a -> Int #

peekElemOff :: Ptr (QuatOffset a) -> Int -> IO (QuatOffset a) #

pokeElemOff :: Ptr (QuatOffset a) -> Int -> QuatOffset a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (QuatOffset a) #

pokeByteOff :: Ptr b -> Int -> QuatOffset a -> IO () #

peek :: Ptr (QuatOffset a) -> IO (QuatOffset a) #

poke :: Ptr (QuatOffset a) -> QuatOffset a -> IO () #

(Quaternionized a, Serialize a) => Serialize (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

put :: Putter (QuatOffset a) #

get :: Get (QuatOffset a) #

type Rep (QuatOffset a) Source # 
Instance details

Defined in Flaw.Math.Transform

type Rep (QuatOffset a) = D1 (MetaData "QuatOffset" "Flaw.Math.Transform" "flaw-math-0.1.0.0-JrJ56aD1KEnFANu7Gz6p3J" False) (C1 (MetaCons "QuatOffset" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Quat a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vec3 a))))

Dual quaternion

data DualQuat a Source #

Dual quaternion representing transforms in 3D space.

Constructors

DualQuat !(Quat a) !(Quat a) 
Instances
Transform DualQuat Source # 
Instance details

Defined in Flaw.Math.Transform

Quaternionized a => Eq (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

(==) :: DualQuat a -> DualQuat a -> Bool #

(/=) :: DualQuat a -> DualQuat a -> Bool #

Quaternionized a => Num (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Quaternionized a => Ord (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

compare :: DualQuat a -> DualQuat a -> Ordering #

(<) :: DualQuat a -> DualQuat a -> Bool #

(<=) :: DualQuat a -> DualQuat a -> Bool #

(>) :: DualQuat a -> DualQuat a -> Bool #

(>=) :: DualQuat a -> DualQuat a -> Bool #

max :: DualQuat a -> DualQuat a -> DualQuat a #

min :: DualQuat a -> DualQuat a -> DualQuat a #

Quaternionized a => Show (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

showsPrec :: Int -> DualQuat a -> ShowS #

show :: DualQuat a -> String #

showList :: [DualQuat a] -> ShowS #

Generic (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Associated Types

type Rep (DualQuat a) :: Type -> Type #

Methods

from :: DualQuat a -> Rep (DualQuat a) x #

to :: Rep (DualQuat a) x -> DualQuat a #

(Quaternionized a, Storable a) => Storable (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

sizeOf :: DualQuat a -> Int #

alignment :: DualQuat a -> Int #

peekElemOff :: Ptr (DualQuat a) -> Int -> IO (DualQuat a) #

pokeElemOff :: Ptr (DualQuat a) -> Int -> DualQuat a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (DualQuat a) #

pokeByteOff :: Ptr b -> Int -> DualQuat a -> IO () #

peek :: Ptr (DualQuat a) -> IO (DualQuat a) #

poke :: Ptr (DualQuat a) -> DualQuat a -> IO () #

(Quaternionized a, Serialize a) => Serialize (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

Methods

put :: Putter (DualQuat a) #

get :: Get (DualQuat a) #

Quaternionized a => Conjugate (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

type Rep (DualQuat a) Source # 
Instance details

Defined in Flaw.Math.Transform

type Rep (DualQuat a) = D1 (MetaData "DualQuat" "Flaw.Math.Transform" "flaw-math-0.1.0.0-JrJ56aD1KEnFANu7Gz6p3J" False) (C1 (MetaCons "DualQuat" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Quat a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Quat a))))

Helper functions

quatAxisRotation :: Quaternionized a => Vec3 a -> a -> Quat a Source #

Quaternion representing rotation around specified axis. Axis should be normalized.