Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- getCameraForward :: Camera -> Vector3
- getCameraUp :: Camera -> Vector3
- getCameraRight :: Camera -> Vector3
- cameraMove :: Camera -> Vector3 -> Camera
- cameraMoveForward :: Camera -> Float -> Bool -> Camera
- cameraMoveUp :: Camera -> Float -> Camera
- cameraMoveRight :: Camera -> Float -> Bool -> Camera
- cameraRotate :: Camera -> Vector3 -> Float -> Bool -> Camera
- cameraYaw :: Camera -> Float -> Bool -> Camera
- cameraPitch :: Camera -> Float -> Bool -> Bool -> Bool -> Camera
- cameraRoll :: Camera -> Float -> Camera
- getCameraViewMatrix :: Camera -> Matrix
- getCameraProjectionMatrix :: Camera -> Float -> Float -> Float -> Matrix
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)
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
Move the camera in its up direction
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
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
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".
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".
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