HGamer3D-Data-0.4.0: Game Engine for the Haskell Programmer - Data Definitions and Utilities

Safe HaskellNone

HGamer3D.Data.Transform3D

Contents

Description

Typeclasses for basic 3D transformations

Synopsis

Types

class HasPosition t whereSource

a type with a HasPosition instance has a Position

Methods

position :: t -> IO PositionSource

get position function

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

set position function

class HasSize t whereSource

a type with a HasSize instance has a Size

Methods

size :: t -> IO SizeSource

get scale function

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

set scale function

class HasOrientation t whereSource

a type with an HasOrientation instance has an oriented in space

Methods

orientation :: t -> IO OrientationSource

get orientation function

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

set orientation function

Functions

translate :: Position -> Position -> PositionSource

move the position

scale :: Size -> Vec3 -> SizeSource

scale the size

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