Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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)
:: 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
:: 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
:: 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
:: 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".
:: 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