Base camera class used to handle camera transformations, movement, and view/projection matrix generation. This class provides common camera functionality and must be inherited to implement specific camera behaviors.
More...
#include <Camera.hpp>
Base camera class used to handle camera transformations, movement, and view/projection matrix generation. This class provides common camera functionality and must be inherited to implement specific camera behaviors.
◆ Camera()
Default camera constructor.
◆ FowardUpdate()
| void Camera::FowardUpdate |
( |
| ) |
|
|
protected |
Updates the forward vector based on the current camera rotation.
◆ Getprojection()
Returns the projection matrix.
- Returns
- Projection matrix
◆ Getview()
Returns the view matrix.
- Returns
- View matrix
◆ GetVP()
Returns the combined View-Projection matrix.
- Returns
- View-Projection matrix
◆ GlobalUpdate()
Updates the global camera state including movement, rotation, and matrix calculations.
- Parameters
-
| input | Input manager used for camera control |
◆ MouseUpdate()
Updates camera rotation using mouse movement.
- Parameters
-
| input | Input manager used to retrieve mouse input |
◆ MoveUpdate()
Updates camera position based on keyboard input.
- Parameters
-
| input | Input manager used to retrieve keyboard input |
◆ ProjectionMatrix()
| void Camera::ProjectionMatrix |
( |
| ) |
|
|
protected |
Calculates the projection matrix using perspective projection.
◆ RightUpdate()
| void Camera::RightUpdate |
( |
| ) |
|
|
protected |
Updates the right vector based on the camera orientation.
◆ RotationUpdate()
Updates the camera rotation based on mouse input.
- Parameters
-
| input | Input manager used to retrieve mouse input |
◆ ToRadians()
| float Camera::ToRadians |
( |
float | degree | ) |
|
Converts degrees to radians.
- Parameters
-
- Returns
- Angle in radians
◆ Update()
Updates the camera state. Must be implemented by derived camera classes.
- Parameters
-
| input | Input manager used to control the camera |
Implemented in EditorCamera.
◆ UpUpdate()
| void Camera::UpUpdate |
( |
| ) |
|
|
protected |
Updates the up vector based on the camera orientation.
◆ ViewMatrix()
| void Camera::ViewMatrix |
( |
| ) |
|
|
protected |
Calculates the view matrix transforming world space to camera space.
◆ VPMatrix()
| void Camera::VPMatrix |
( |
| ) |
|
|
protected |
Updates the View-Projection matrix.
◆ aspectRatio
| float Camera::aspectRatio |
|
protected |
Aspect ratio of the camera viewport.
◆ farPlane
Far clipping plane distance.
◆ firstMousePos
| bool Camera::firstMousePos = true |
|
protected |
Indicates whether the first mouse position has been recorded.
◆ forward
Forward direction vector of the camera.
◆ fov
Field of view in degrees.
◆ moveSpeed
| float Camera::moveSpeed = 0.5f |
|
protected |
◆ nearPlane
Near clipping plane distance.
◆ position
Position of the camera in world space.
◆ projection
Projection matrix used for perspective transformation.
◆ right
Right direction vector of the camera.
◆ rotation
Rotation of the camera represented as a quaternion.
◆ sensitivity
| float Camera::sensitivity = 0.01f |
|
protected |
Mouse sensitivity used for camera rotation.
◆ up
Up direction vector of the camera.
◆ view
View matrix used to transform world coordinates into camera space.
◆ VP
Combined View-Projection matrix (Projection * View).
The documentation for this class was generated from the following file:
- Engine/Components/UserComponents/Headers/Camera/Camera.hpp