HGamer3D-Data-0.5.0: Toolset for the Haskell Game Programmer - Data Definitions

Safe HaskellNone
LanguageHaskell98

HGamer3D.Data.Transform3D

Contents

Description

Typeclasses for basic 3D transformations

Synopsis

Types

class HasPosition t where Source

a type with a HasPosition instance has a Position

Methods

position :: t -> IO Position Source

get position function

positionTo :: t -> Position -> IO () Source

set position function

class HasSize t where Source

a type with a HasSize instance has a Size

Methods

size :: t -> IO Size Source

get scale function

sizeTo :: t -> Size -> IO () Source

set scale function

class HasOrientation t where Source

a type with an HasOrientation instance has an oriented in space

Methods

orientation :: t -> IO Orientation Source

get orientation function

orientationTo :: t -> Orientation -> IO () Source

set orientation function

Functions

translate :: Position -> Position -> Position Source

move the position

scale :: Size -> Vec3 -> Size Source

scale the size

yaw :: Orientation -> Angle -> Orientation Source

rotate object on own axis (yaw) by angle

pitch :: Orientation -> Angle -> Orientation Source

rotate object on own axis (pitch) by angle

roll :: Orientation -> Angle -> Orientation Source

rotate object on own axis (roll) by angle