geomancy-0.2.6.0: Geometry and matrix manipulation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Geomancy.Quaternion

Description

Specialized and inlined Quaternion Float.

Synopsis

Documentation

data Quaternion Source #

Instances

Instances details
Storable Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Num Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Show Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

NFData Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Methods

rnf :: Quaternion -> () #

Eq Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Ord Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Block Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

Associated Types

type PackedSize Quaternion :: Nat #

type PackedSize Quaternion Source # 
Instance details

Defined in Geomancy.Quaternion

withQuaternion :: Quaternion -> (Float -> Float -> Float -> Float -> r) -> r Source #

axisAngle :: Vec3 -> Float -> Quaternion Source #

Quaternion construction from axis and angle.

rotationBetween :: Vec3 -> Vec3 -> Quaternion Source #

Rotation between vectors.

(in other words: the quaternion needed to rotate v1 so that it matches v2)

lookAtUp :: Vec3 -> Vec3 -> Vec3 -> Quaternion Source #

Orient towards a point.

Use "rotationBetween" if you don't need to keep the object upright.