h-raylib-5.5.1.0: Raylib bindings for Haskell
Safe HaskellNone
LanguageHaskell2010

Raylib.Util.Camera

Description

Bindings to rcamera (rcamera.h)

These were rewritten in Haskell instead of binding to C. All the functions are pure.

Synopsis

Documentation

getCameraForward :: Camera -> Vector3 Source #

The camera's forward vector (normalized)

getCameraUp :: Camera -> Vector3 Source #

The camera's up vector (normalized)

getCameraRight :: Camera -> Vector3 Source #

The camera's right vector (normalized)

cameraMove :: Camera -> Vector3 -> Camera Source #

Move the camera by a specific vector

cameraMoveForward Source #

Arguments

:: Camera 
-> Float

Distance to move

-> Bool

Move in world plane (i.e. no vertical movement if enabled)

-> Camera 

Move the camera in its forward direction

cameraMoveUp Source #

Arguments

:: Camera 
-> Float

Distance to move

-> Camera 

Move the camera in its up direction

cameraMoveRight Source #

Arguments

:: Camera 
-> Float

Distance to move

-> Bool

Move in world plane (i.e. no vertical movement if enabled)

-> Camera 

Move the camera in its right direction

cameraRotate Source #

Arguments

:: Camera 
-> Vector3

Axis of rotation

-> Float

Angle to rotate by

-> Bool

Rotate around target (if false, the camera rotates around its position)

-> Camera 

Rotate the camera using an axis and angle

cameraYaw Source #

Arguments

:: Camera 
-> Float

Angle in radians

-> Bool

Rotate around target (if false, the camera rotates around its position)

-> Camera 

Rotate the camera around its up vector. Yaw is "looking left and right".

cameraPitch Source #

Arguments

:: Camera 
-> Float

Angle in radians

-> Bool

Lock view (prevents camera overrotation, aka "somersaults")

-> Bool

Rotate around target (if false, the camera rotates around its position)

-> Bool

Rotate the camera's up vector to match the new pitch

-> Camera 

Rotate the camera around its right vector. Pitch is "looking up and down".

cameraRoll Source #

Arguments

:: Camera 
-> Float

Angle in radians

-> Camera 

Rotates the camera around its forward vector. Roll is "turning your head sideways to the left or right".

getCameraViewMatrix :: Camera -> Matrix Source #

View matrix from camera

getCameraProjectionMatrix Source #

Arguments

:: Camera 
-> Float

Aspect ratio

-> Float

Near clipping plane distance (recommended: 0.01)

-> Float

Far clipping plane distance (recommended: 1000)

-> Matrix 

Projection matrix from camera