fwgl-0.1.3.1: Game engine

Safe HaskellNone
LanguageHaskell2010

FWGL.Transformation

Synopsis

Documentation

transMat4 :: Vec3 -> Mat4 Source

4x4 translation matrix.

rotXMat4 :: Float -> Mat4 Source

4x4 rotation matrix (X axis).

rotYMat4 :: Float -> Mat4 Source

4x4 rotation matrix (Y axis).

rotZMat4 :: Float -> Mat4 Source

4x4 rotation matrix (Z axis).

rotMat4 Source

Arguments

:: Vec3

Axis.

-> Float

Angle

-> Mat4 

4x4 rotation matrix.

scaleMat4 :: Vec3 -> Mat4 Source

4x4 scale matrix.

orthoMat4 Source

Arguments

:: Float

Near

-> Float

Far

-> Float

Left

-> Float

Right

-> Float

Bottom

-> Float

Top

-> Mat4 

4x4 orthographic projection matrix.

perspectiveMat4 Source

Arguments

:: Float

Near

-> Float

Far

-> Float

FOV

-> Float

Aspect ratio

-> Mat4 

4x4 perspective projection matrix.

cameraMat4 Source

Arguments

:: Vec3

Eye

-> Float

Pitch

-> Float

Yaw

-> Mat4 

4x4 FPS camera matrix.

lookAtMat4 Source

Arguments

:: Vec3

Eye

-> Vec3

Target

-> Vec3

Up

-> Mat4 

4x4 "look at" camera matrix.

transMat3 :: Vec2 -> Mat3 Source

3x3 translation matrix.

rotMat3 :: Float -> Mat3 Source

3x3 rotation matrix.

scaleMat3 :: Vec2 -> Mat3 Source

3x3 scale matrix.