src/rcamera
- -Consts
--
-
CameraCullDistanceFar = 1000.0
- - - - - Source -Edit - - -
CameraCullDistanceNear = 0.01
- - - - - Source -Edit - - -
CameraMouseMoveSensitivity = 0.003'f32
- - - - - Source -Edit - - -
CameraMoveSpeed = 5.4'f32
- - - - - Source -Edit - - -
CameraOrbitalSpeed = 0.5'f32
- - - - - Source -Edit - - -
CameraPanSpeed = 0.2'f32
- - - - - Source -Edit - - -
CameraRotationSpeed = 0.03'f32
- - - - - Source -Edit - - -
Procs
--
-
func getForward(camera: Camera): Vector3 {....raises: [], tags: [], forbids: [].}
- - - - Returns the camera's forward vector (normalized) - Source -Edit - - -
func getProjectionMatrix(camera: Camera; aspect: float32): Matrix {....raises: [], - tags: [], forbids: [].}
- - - - - Source -Edit - - -
func getViewMatrix(camera: Camera): Matrix {....raises: [], tags: [], forbids: [].}
- - - - Returns the camera view matrix - Source -Edit - - -
func moveForward(camera: var Camera; distance: float32; moveInWorldPlane: bool) {. - ...raises: [], tags: [], forbids: [].}
- - - - Moves the camera in its forward direction - Source -Edit - - -
func moveToTarget(camera: var Camera; delta: float32) {....raises: [], tags: [], - forbids: [].}
- - - Moves the camera position closer/farther to/from the camera target - Source -Edit - - -
func pitch(camera: var Camera; angle: float32; - lockView, rotateAroundTarget, rotateUp: bool) {....raises: [], tags: [], - forbids: [].}
- -
-
- Rotates the camera around its right vector, pitch is "looking up and down"
- lockView prevents camera overrotation (aka "somersaults") -
- rotateAroundTarget defines if rotation is around target or around its position -
- rotateUp rotates the up direction as well (typically only useful in CAMERA_FREE) -
NOTE: angle must be provided in radians
- - Source -Edit - -
- func yaw(camera: var Camera; angle: float32; rotateAroundTarget: bool) {. - ...raises: [], tags: [], forbids: [].}
- - - - Rotates the camera around its up vector Yaw is "looking left and right" If rotateAroundTarget is false, the camera rotates around its position Note: angle must be provided in radians - Source -Edit - - -