KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::OrthographicCamera Class Reference

Class for OrthographicCamera meaning Camera without depth scaling. More...

#include <OrthographicCamera.h>

Inheritance diagram for Karma::OrthographicCamera:
Collaboration diagram for Karma::OrthographicCamera:

Public Member Functions

 OrthographicCamera (float left, float right, float bottom, float top)
 Default constructor.
 
- Public Member Functions inherited from Karma::Camera
 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

- Protected Member Functions inherited from Karma::Camera
void InitializePitchRoll ()
 
- Protected Attributes inherited from Karma::Camera
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
 

Detailed Description

Class for OrthographicCamera meaning Camera without depth scaling.

Constructor & Destructor Documentation

◆ OrthographicCamera()

Karma::OrthographicCamera::OrthographicCamera ( float left,
float right,
float bottom,
float top )

Default constructor.

Parameters
leftleftmost x coordinate in world units
rightrightmost x coordinate in world units
bottombottom most y coordinate in world units
toptop most y coordinate in world units
Since
Karma 1.0.0

The documentation for this class was generated from the following files: