KarmaEngine
Game Engine for practical learning and research purposes
|
Class for OrthographicCamera meaning Camera without depth scaling. More...
#include <OrthographicCamera.h>
Public Member Functions | |
OrthographicCamera (float left, float right, float bottom, float top) | |
Default constructor. | |
![]() | |
Camera (const glm::vec3 &initialCameraPosition) | |
Default constructor. | |
virtual | ~Camera () |
Destructor. | |
const glm::vec3 & | GetPosition () const |
Getter for current position of the Camers. | |
float | GetRotation () const |
Getter for current rotation. | |
void | LeftMouseButtonPressed () |
Differentiates between single button press and drag. | |
void | LeftMouseButtonReleased () |
Setting m_IsLeftMouseButtonPressed to false. | |
void | ComputeCameraFront () |
Computes the pointing vector of the camera (outward positive) given the current pitch, and roll. (no yaw) | |
void | SetPosition (const glm::vec3 &position) |
Sets the current position of the Camera. | |
void | SetRotation (float rotation) |
Sets the current rotation of the Camera. | |
void | SetCameraFront (const glm::vec3 &front) |
Set the front vector of Camera. | |
void | SetCameraUp (const glm::vec3 &up) |
Set the up vector of Camera. | |
void | MoveForward (float amount) |
Translate in the direction of front vector. | |
void | MoveSideways (float amount) |
Move sideways in the direction of cross product of front vector and up vector. | |
void | MoveUp (float amount) |
Move in the direction of Up. | |
void | RotateAboutYAxis (float amount) |
Rotate about Y-axis. | |
void | RotateAboutXAxis (float amount) |
Rotate about X-axis. | |
const glm::mat4 & | GetProjectionMatrix () const |
Getter for ProjectionMatrix. | |
const glm::mat4 & | GetViewMatirx () const |
Getter for ViewMatrix. | |
Additional Inherited Members | |
![]() | |
void | InitializePitchRoll () |
![]() | |
glm::mat4 | m_ProjectionMatrix |
glm::mat4 | m_ViewMatrix |
glm::vec3 | m_Position |
glm::vec3 | m_CameraFront |
glm::vec3 | m_CameraUp |
float | m_Rotation = 0.0f |
bool | m_IsLeftMouseButtonPressed = false |
float | m_LastMouseX |
float | m_LastMouseY |
const float | m_Sensitivity = 0.1f |
float | m_Roll = 0.0f |
float | m_Pitch = 0.0f |
Class for OrthographicCamera meaning Camera without depth scaling.
Karma::OrthographicCamera::OrthographicCamera | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top ) |
Default constructor.
left | leftmost x coordinate in world units |
right | rightmost x coordinate in world units |
bottom | bottom most y coordinate in world units |
top | top most y coordinate in world units |