GearEngine  0.0.1
Gear::WindowsInput 클래스 참조

#include <WindowsInput.h>

Gear::WindowsInput에 대한 상속 다이어그램 :
Inheritance graph
Gear::WindowsInput에 대한 협력 다이어그램:
Collaboration graph

정적 Public 멤버 함수

static bool IsKeyPressd (int keycode)
 
static bool IsMouseButtonPressed (int button)
 
static std::pair< float, float > GetMousePosition ()
 
static float GetMouseX ()
 
static float GetMouseY ()
 

Protected 멤버 함수

virtual bool IsKeyPressedImpl (int keycode) override
 
virtual bool IsMouseButtonPressedImpl (int keycode) override
 
virtual std::pair< float, float > GetMousePositionImpl () override
 
virtual float GetMouseXImpl () override
 
virtual float GetMouseYImpl () override
 

정적 Private 속성

static Scope< Inputs_Instance = CreateScope<WindowsInput>()
 

상세한 설명

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

멤버 함수 문서화

◆ GetMousePosition()

static std::pair<float, float> Gear::Input::GetMousePosition ( )
inlinestaticinherited

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

12 { return s_Instance->GetMousePositionImpl (); }

◆ GetMousePositionImpl()

std::pair< float, float > Gear::WindowsInput::GetMousePositionImpl ( )
overrideprotectedvirtual

Gear::Input를 구현.

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

29  {
30  auto window = static_cast<GLFWwindow*>(Application::Get().GetWindow().GetNativeWindow());
31  double xpos, ypos;
32  glfwGetCursorPos(window, &xpos, &ypos);
33 
34  return { (float)xpos, (float)ypos };
35  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetMouseX()

static float Gear::Input::GetMouseX ( )
inlinestaticinherited

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

13 { return s_Instance->GetMouseXImpl(); }

◆ GetMouseXImpl()

float Gear::WindowsInput::GetMouseXImpl ( )
overrideprotectedvirtual

Gear::Input를 구현.

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

38  {
39  auto[x, y] = GetMousePositionImpl();
40  return x;
41  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ GetMouseY()

static float Gear::Input::GetMouseY ( )
inlinestaticinherited

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

14 { return s_Instance->GetMouseYImpl(); }

◆ GetMouseYImpl()

float Gear::WindowsInput::GetMouseYImpl ( )
overrideprotectedvirtual

Gear::Input를 구현.

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

44  {
45  auto[x, y] = GetMousePositionImpl();
46  return y;
47  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ IsKeyPressd()

static bool Gear::Input::IsKeyPressd ( int  keycode)
inlinestaticinherited

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

9 { return s_Instance->IsKeyPressedImpl(keycode); }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IsKeyPressedImpl()

bool Gear::WindowsInput::IsKeyPressedImpl ( int  keycode)
overrideprotectedvirtual

Gear::Input를 구현.

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

12  {
13  auto window = static_cast<GLFWwindow*>(Application::Get().GetWindow().GetNativeWindow());
14  auto state = glfwGetKey(window, keycode);
15 
16  return state == GLFW_PRESS || state == GLFW_REPEAT;
17  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ IsMouseButtonPressed()

static bool Gear::Input::IsMouseButtonPressed ( int  button)
inlinestaticinherited

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

11 { return s_Instance->IsMouseButtonPressedImpl(button); }

◆ IsMouseButtonPressedImpl()

bool Gear::WindowsInput::IsMouseButtonPressedImpl ( int  keycode)
overrideprotectedvirtual

Gear::Input를 구현.

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

20  {
21  auto window = static_cast<GLFWwindow*>(Application::Get().GetWindow().GetNativeWindow());
22  double xpos, ypos;
23  glfwGetCursorPos(window, &xpos, &ypos);
24 
25  return (float)xpos;
26  }
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ s_Instance

Scope< Input > Gear::Input::s_Instance = CreateScope<WindowsInput>()
staticprivateinherited

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


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.:
Gear::Application::Get
static Application & Get()
Definition: Application.h:27
Gear::Application::GetWindow
Window & GetWindow()
Definition: Application.h:28
Gear::Window::GetNativeWindow
virtual void * GetNativeWindow() const =0
Gear::WindowsInput::GetMousePositionImpl
virtual std::pair< float, float > GetMousePositionImpl() override
Definition: WindowsInput.cpp:28
Gear::Input::s_Instance
static Scope< Input > s_Instance
Definition: Input.h:25