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

Safe HaskellNone

HGamer3D.Data.Operation3D

Contents

Description

Typeclasses for basic 3D operations

Synopsis

Types

class Position3D t whereSource

a type with a Position3D instance can be positioned

Methods

position3D :: t -> IO Vec3Source

get position function

positionTo3D :: t -> Vec3 -> IO ()Source

set position function

class Scale3D t whereSource

a type with a Scale3D instance can be scaled

Methods

scale3D :: t -> IO Vec3Source

get scale function

scaleTo3D :: t -> Vec3 -> IO ()Source

set scale function

class Direction3D t whereSource

a type with a Direction3D instance can be oriented towards a point (Camera for example)

Methods

direction3D :: t -> IO Vec3Source

get direction function

directionTo3D :: t -> Vec3 -> IO ()Source

set direction function

class Orientation3D t whereSource

a type with an Orientation3D instance can be oriented in space

Methods

orientation3D :: t -> IO UnitQuaternionSource

get orientation function

orientationTo3D :: t -> UnitQuaternion -> IO ()Source

set orientation function

Functions

translate3D :: Position3D t => t -> Vec3 -> IO ()Source

move position function

yaw3D :: Orientation3D t => t -> Angle -> IO ()Source

rotate object on own axis (yaw) by angle

pitch3D :: Orientation3D t => t -> Angle -> IO ()Source

rotate object on own axis (pitch) by angle

roll3D :: Orientation3D t => t -> Angle -> IO ()Source

rotate object on own axis (roll) by angle