GearEngine  0.0.1
Gear::OrthographicCameraController 클래스 참조

#include <OrthographicCameraController.h>

Gear::OrthographicCameraController에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 OrthographicCameraController (float aspectRatio, bool rotation=false)
 
void OnUpdate (Timestep ts)
 
void OnEvent (Event &e)
 
OrthographicCameraGetCamera ()
 
const OrthographicCameraGetCamera () const
 
float GetZoomLevel () const
 
void SetZoomLevel (float level)
 

Private 멤버 함수

bool OnMouseScrolled (MouseScrolledEvent &e)
 
bool OnWindowResized (WindowResizeEvent &e)
 

Private 속성

float m_AspectRatio
 
float m_ZoomLevel = 1.0f
 
OrthographicCamera m_Camera
 
bool m_Rotation = false
 
glm::vec3 m_CameraPosition = { 0.0f, 0.0f, 0.0f }
 
float m_CameraRotation = 0.0f
 
float m_CameraTranslationSpeed = 5.0f
 
float m_CameraRotationSpeed = 180.0f
 

상세한 설명

OrthographicCameraController.h 파일의 11 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ OrthographicCameraController()

Gear::OrthographicCameraController::OrthographicCameraController ( float  aspectRatio,
bool  rotation = false 
)

OrthographicCameraController.cpp 파일의 8 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ GetCamera() [1/2]

OrthographicCamera& Gear::OrthographicCameraController::GetCamera ( )
inline

OrthographicCameraController.h 파일의 19 번째 라인에서 정의되었습니다.

19 { return m_Camera; }

◆ GetCamera() [2/2]

const OrthographicCamera& Gear::OrthographicCameraController::GetCamera ( ) const
inline

OrthographicCameraController.h 파일의 20 번째 라인에서 정의되었습니다.

20 { return m_Camera; }

◆ GetZoomLevel()

float Gear::OrthographicCameraController::GetZoomLevel ( ) const
inline

OrthographicCameraController.h 파일의 22 번째 라인에서 정의되었습니다.

22 { return m_ZoomLevel; }

◆ OnEvent()

void Gear::OrthographicCameraController::OnEvent ( Event e)

OrthographicCameraController.cpp 파일의 40 번째 라인에서 정의되었습니다.

41  {
43 
44  EventDispatcher dispatcher(e);
45  dispatcher.Dispatch<MouseScrolledEvent>(GR_BIND_EVENT_FN(OrthographicCameraController::OnMouseScrolled));
46  dispatcher.Dispatch<WindowResizeEvent>(GR_BIND_EVENT_FN(OrthographicCameraController::OnWindowResized));
47  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnMouseScrolled()

bool Gear::OrthographicCameraController::OnMouseScrolled ( MouseScrolledEvent e)
private

OrthographicCameraController.cpp 파일의 48 번째 라인에서 정의되었습니다.

49  {
51 
52  m_ZoomLevel -= e.GetYOffset() * 0.25f;
53  m_ZoomLevel = std::max(m_ZoomLevel, 0.25f);
55 
56  return false;
57  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnUpdate()

void Gear::OrthographicCameraController::OnUpdate ( Timestep  ts)

OrthographicCameraController.cpp 파일의 12 번째 라인에서 정의되었습니다.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnWindowResized()

bool Gear::OrthographicCameraController::OnWindowResized ( WindowResizeEvent e)
private

OrthographicCameraController.cpp 파일의 58 번째 라인에서 정의되었습니다.

59  {
61 
62  m_AspectRatio = (float)e.GetWidth() / (float)e.GetHeight();
64  return false;
65  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetZoomLevel()

void Gear::OrthographicCameraController::SetZoomLevel ( float  level)
inline

OrthographicCameraController.h 파일의 23 번째 라인에서 정의되었습니다.

23 { m_ZoomLevel = level; }

멤버 데이터 문서화

◆ m_AspectRatio

float Gear::OrthographicCameraController::m_AspectRatio
private

OrthographicCameraController.h 파일의 28 번째 라인에서 정의되었습니다.

◆ m_Camera

OrthographicCamera Gear::OrthographicCameraController::m_Camera
private

OrthographicCameraController.h 파일의 30 번째 라인에서 정의되었습니다.

◆ m_CameraPosition

glm::vec3 Gear::OrthographicCameraController::m_CameraPosition = { 0.0f, 0.0f, 0.0f }
private

OrthographicCameraController.h 파일의 34 번째 라인에서 정의되었습니다.

◆ m_CameraRotation

float Gear::OrthographicCameraController::m_CameraRotation = 0.0f
private

OrthographicCameraController.h 파일의 35 번째 라인에서 정의되었습니다.

◆ m_CameraRotationSpeed

float Gear::OrthographicCameraController::m_CameraRotationSpeed = 180.0f
private

OrthographicCameraController.h 파일의 37 번째 라인에서 정의되었습니다.

◆ m_CameraTranslationSpeed

float Gear::OrthographicCameraController::m_CameraTranslationSpeed = 5.0f
private

OrthographicCameraController.h 파일의 37 번째 라인에서 정의되었습니다.

◆ m_Rotation

bool Gear::OrthographicCameraController::m_Rotation = false
private

OrthographicCameraController.h 파일의 32 번째 라인에서 정의되었습니다.

◆ m_ZoomLevel

float Gear::OrthographicCameraController::m_ZoomLevel = 1.0f
private

OrthographicCameraController.h 파일의 29 번째 라인에서 정의되었습니다.


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.:
GR_KEY_A
#define GR_KEY_A
Definition: KeyCodes.h:22
GR_BIND_EVENT_FN
#define GR_BIND_EVENT_FN(fn)
Definition: Core.h:73
Gear::OrthographicCameraController::m_CameraRotation
float m_CameraRotation
Definition: OrthographicCameraController.h:35
Gear::OrthographicCameraController::m_CameraPosition
glm::vec3 m_CameraPosition
Definition: OrthographicCameraController.h:34
GR_KEY_D
#define GR_KEY_D
Definition: KeyCodes.h:25
GR_PROFILE_FUNCTION
#define GR_PROFILE_FUNCTION()
Definition: Instrumentor.h:131
GR_KEY_S
#define GR_KEY_S
Definition: KeyCodes.h:40
Gear::OrthographicCameraController::m_Rotation
bool m_Rotation
Definition: OrthographicCameraController.h:32
Gear::OrthographicCamera::SetProjection
void SetProjection(float left, float right, float bottom, float top)
Definition: OrthographicCamera.cpp:15
Gear::OrthographicCameraController::m_AspectRatio
float m_AspectRatio
Definition: OrthographicCameraController.h:28
Gear::OrthographicCameraController::m_ZoomLevel
float m_ZoomLevel
Definition: OrthographicCameraController.h:29
Gear::OrthographicCamera::SetPosition
void SetPosition(const glm::vec3 &position)
Definition: OrthographicCamera.h:13
Gear::OrthographicCameraController::m_CameraRotationSpeed
float m_CameraRotationSpeed
Definition: OrthographicCameraController.h:37
GR_KEY_W
#define GR_KEY_W
Definition: KeyCodes.h:44
Gear::OrthographicCameraController::m_Camera
OrthographicCamera m_Camera
Definition: OrthographicCameraController.h:30
Gear::Input::IsKeyPressd
static bool IsKeyPressd(int keycode)
Definition: Input.h:9
GR_KEY_Q
#define GR_KEY_Q
Definition: KeyCodes.h:38
GR_KEY_E
#define GR_KEY_E
Definition: KeyCodes.h:26
Gear::OrthographicCameraController::m_CameraTranslationSpeed
float m_CameraTranslationSpeed
Definition: OrthographicCameraController.h:37
Gear::OrthographicCameraController::OnWindowResized
bool OnWindowResized(WindowResizeEvent &e)
Definition: OrthographicCameraController.cpp:58
Gear::OrthographicCameraController::OnMouseScrolled
bool OnMouseScrolled(MouseScrolledEvent &e)
Definition: OrthographicCameraController.cpp:48
Gear::OrthographicCamera::SetRotation
void SetRotation(float rotation)
Definition: OrthographicCamera.h:16