From 9374d127abb0d74cba71e5f44591e8f007d7e83c Mon Sep 17 00:00:00 2001 From: Antonis Geralis Date: Mon, 18 Nov 2024 12:10:51 +0200 Subject: [PATCH] rcamera docs --- docs/rcamera.html | 412 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 docs/rcamera.html diff --git a/docs/rcamera.html b/docs/rcamera.html new file mode 100644 index 0000000..1bf7dc8 --- /dev/null +++ b/docs/rcamera.html @@ -0,0 +1,412 @@ + + + + + + + +src/rcamera + + + + + + + + + + + + + + + + +
+
+

src/rcamera

+
+ +
+ Source   +Edit   + +
+ +

+
+

Imports

+
+ raylib, raymath +
+
+
+

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 getRight(camera: Camera): Vector3 {....raises: [], tags: [], forbids: [].}
+
+ + Returns the camera's right vector (normalized) + Source   +Edit   + +
+
+ +
+
+
+
func getUp(camera: Camera): Vector3 {....raises: [], tags: [], forbids: [].}
+
+ + Returns the camera's up vector (normalized) Note: The up vector might not be perpendicular to the forward vector + 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 moveRight(camera: var Camera; distance: float32; moveInWorldPlane: bool) {.
+    ...raises: [], tags: [], forbids: [].}
+
+ + Moves the camera target in its current right 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 moveUp(camera: var Camera; distance: float32) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Moves the camera in its up direction + 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 roll(camera: var Camera; angle: float32) {....raises: [], tags: [],
+    forbids: [].}
+
+ + Rotates the camera around its forward vector Roll is "turning your head sideways to the left or right" 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   + +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + +