Safe Haskell | None |
---|
Typeclasses for basic 3D transformations
- class HasPosition t where
- class HasSize t where
- class HasOrientation t where
- orientation :: t -> IO Orientation
- orientationTo :: t -> Orientation -> IO ()
- translate :: Position -> Position -> Position
- scale :: Size -> Vec3 -> Size
- yaw :: Orientation -> Angle -> Orientation
- pitch :: Orientation -> Angle -> Orientation
- roll :: Orientation -> Angle -> Orientation
Types
class HasPosition t whereSource
a type with a HasPosition instance has a Position
a type with a HasSize instance has a Size
class HasOrientation t whereSource
a type with an HasOrientation instance has an oriented in space
orientation :: t -> IO OrientationSource
get orientation function
orientationTo :: t -> Orientation -> IO ()Source
set orientation function
Functions
yaw :: Orientation -> Angle -> OrientationSource
rotate object on own axis (yaw) by angle
pitch :: Orientation -> Angle -> OrientationSource
rotate object on own axis (pitch) by angle
roll :: Orientation -> Angle -> OrientationSource
rotate object on own axis (roll) by angle