#include <EditorCamera.h>
◆ EditorCamera() [1/2]
| Muto::EditorCamera::EditorCamera |
( |
| ) |
|
◆ EditorCamera() [2/2]
17 {
19 }
float m_AspectRatio
Definition EditorCamera.h:66
float m_FarClip
Definition EditorCamera.h:66
float m_FOV
Definition EditorCamera.h:66
void UpdateView()
Definition EditorCamera.cpp:77
float m_NearClip
Definition EditorCamera.h:66
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51
References EditorCamera(), m_AspectRatio, m_FarClip, m_FOV, m_NearClip, and UpdateView().
Referenced by EditorCamera().
◆ CalculatePosition()
| glm::vec3 Muto::EditorCamera::CalculatePosition |
( |
| ) |
const |
|
private |
120 {
122 }
glm::vec3 m_FocalPoint
Definition EditorCamera.h:70
float m_Distance
Definition EditorCamera.h:74
glm::vec3 GetForwardDirection() const
Definition EditorCamera.cpp:133
◆ GetDistance()
| float Muto::EditorCamera::GetDistance |
( |
| ) |
const |
|
inline |
◆ GetForwardDirection()
| glm::vec3 Muto::EditorCamera::GetForwardDirection |
( |
| ) |
const |
133 {
134 return glm::rotate(
GetOrientation(), glm::vec3(0.0f, 0.0f, -1.0f));
135 }
glm::quat GetOrientation() const
Definition EditorCamera.cpp:137
◆ GetOrientation()
| glm::quat Muto::EditorCamera::GetOrientation |
( |
| ) |
const |
137 {
139 }
float m_Pitch
Definition EditorCamera.h:75
float m_Yaw
Definition EditorCamera.h:75
◆ GetPitch()
| float Muto::EditorCamera::GetPitch |
( |
| ) |
const |
|
inline |
◆ GetPosition()
| const glm::vec3 & Muto::EditorCamera::GetPosition |
( |
| ) |
const |
|
inline |
glm::vec3 m_Position
Definition EditorCamera.h:69
◆ GetRightDirection()
| glm::vec3 Muto::EditorCamera::GetRightDirection |
( |
| ) |
const |
129 {
130 return glm::rotate(
GetOrientation(), glm::vec3(1.0f, 0.0f, 0.0f));
131 }
◆ GetUpDirection()
| glm::vec3 Muto::EditorCamera::GetUpDirection |
( |
| ) |
const |
124 {
125
126 return glm::rotate(
GetOrientation(), glm::vec3(0.0f, 1.0f, 0.0f));
127 }
◆ GetViewMatrix()
| const glm::mat4 & Muto::EditorCamera::GetViewMatrix |
( |
| ) |
const |
|
inline |
glm::mat4 m_ViewMatrix
Definition EditorCamera.h:68
◆ GetViewProjection()
| glm::mat4 Muto::EditorCamera::GetViewProjection |
( |
| ) |
const |
|
inline |
glm::mat4 m_Projection
Definition Camera.h:25
◆ GetYaw()
| float Muto::EditorCamera::GetYaw |
( |
| ) |
const |
|
inline |
◆ MousePan()
| void Muto::EditorCamera::MousePan |
( |
const glm::vec2 & |
delta | ) |
|
|
private |
96 {
100 }
glm::vec3 GetRightDirection() const
Definition EditorCamera.cpp:129
glm::vec3 GetUpDirection() const
Definition EditorCamera.cpp:124
std::pair< float, float > PanSpeed() const
Definition EditorCamera.cpp:21
◆ MouseRotate()
| void Muto::EditorCamera::MouseRotate |
( |
const glm::vec2 & |
delta | ) |
|
|
private |
◆ MouseZoom()
| void Muto::EditorCamera::MouseZoom |
( |
float |
delta | ) |
|
|
private |
◆ OnEvent()
| void Muto::EditorCamera::OnEvent |
( |
Event & |
e | ) |
|
◆ OnMouseScroll()
◆ OnUpdate()
◆ PanSpeed()
| std::pair< float, float > Muto::EditorCamera::PanSpeed |
( |
| ) |
const |
|
private |
22 {
24 float xFactor = 0.0366f * (
x *
x) - 0.1778f *
x + 0.3021f;
25
27 float yFactor = 0.0366f * (
y *
y) - 0.1778f *
y + 0.3021f;
28
30 }
float m_ViewportWidth
Definition EditorCamera.h:77
float m_ViewportHeight
Definition EditorCamera.h:77
References m_ViewportHeight, and m_ViewportWidth.
◆ RotationSpeed()
| float Muto::EditorCamera::RotationSpeed |
( |
| ) |
const |
|
private |
◆ SetDistance()
| void Muto::EditorCamera::SetDistance |
( |
float |
distance | ) |
|
|
inline |
◆ SetPitch()
| void Muto::EditorCamera::SetPitch |
( |
float |
pitch | ) |
|
|
inline |
◆ SetPosition()
| void Muto::EditorCamera::SetPosition |
( |
const glm::vec3 & |
position | ) |
|
◆ SetViewportSize()
| void Muto::EditorCamera::SetViewportSize |
( |
float |
width, |
|
|
float |
height |
|
) |
| |
|
inline |
◆ SetYaw()
◆ UpdateProjection()
| void Muto::EditorCamera::UpdateProjection |
( |
| ) |
|
|
private |
◆ UpdateView()
| void Muto::EditorCamera::UpdateView |
( |
| ) |
|
|
private |
◆ ZoomSpeed()
| float Muto::EditorCamera::ZoomSpeed |
( |
| ) |
const |
|
private |
◆ m_AspectRatio
| float Muto::EditorCamera::m_AspectRatio = 1.778f |
|
private |
◆ m_Distance
| float Muto::EditorCamera::m_Distance = 10.0f |
|
private |
◆ m_FarClip
| float Muto::EditorCamera::m_FarClip = 1000.0f |
|
private |
◆ m_FocalPoint
| glm::vec3 Muto::EditorCamera::m_FocalPoint = glm::vec3(1.0f) |
|
private |
◆ m_FOV
| float Muto::EditorCamera::m_FOV = 45.0f |
|
private |
◆ m_InitialMousePosition
| glm::vec2 Muto::EditorCamera::m_InitialMousePosition = { 0.0f, 0.0f } |
|
private |
◆ m_NearClip
| float Muto::EditorCamera::m_NearClip = 0.1f |
|
private |
◆ m_Pitch
| float Muto::EditorCamera::m_Pitch = 0.0f |
|
private |
◆ m_Position
| glm::vec3 Muto::EditorCamera::m_Position = { 0.0f, 0.0f, 0.0f } |
|
private |
◆ m_ViewMatrix
| glm::mat4 Muto::EditorCamera::m_ViewMatrix |
|
private |
◆ m_ViewportHeight
| float Muto::EditorCamera::m_ViewportHeight = 720 |
|
private |
◆ m_ViewportWidth
| float Muto::EditorCamera::m_ViewportWidth = 1280 |
|
private |
◆ m_Yaw
| float Muto::EditorCamera::m_Yaw = 0.0f |
|
private |
The documentation for this class was generated from the following files: