HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
App::InputHandler Class Reference

Processes keyboard and mouse input, managing player movement, camera state, and world interaction. More...

#include <src/app/InputHandler.h>

Collaboration diagram for App::InputHandler:
Collaboration graph

Public Member Functions

 InputHandler (const Core::Vec3 &ObjStartPos)
 
void ProcessInput (GLFWwindow *pWindow, ChunkManager &objChunkManager, float fDeltaTime)
 Polls and processes raw input events to update global application state.
 
void UpdatePlayerPhysics (float fDeltaTime, const ChunkManager &objChunkManager)
 Updates player movement and collision based on elapsed time.
 
RayHit ProcessFirePreviewAndFire (ChunkManager &objChunkManager, const Core::Mat4 &viewProjection)
 Raycasts into the world to preview, place, destroy, or inject heat into blocks.
 
float GetOrthoSize () const
 
void SetOrthoSize (float fValue)
 
bool IsSIMDEnabled () const
 
void SetEnableSIMD (bool bValue)
 
bool IsNeighborCullingEnabled () const
 
void SetNeighborCullingEnable (bool bValue)
 
bool IsFrustumCullingEnabled () const
 
void SetFrustumCullingEnable (bool bValue)
 
int GetActiveThreads () const
 
void SetActiveThreads (int iCt)
 
bool IsPerspective () const
 
void SetPerspective (bool bValue)
 
bool IsLMBClickedFirstTime () const
 
void SetLMBClickedFirstTime (bool bValue)
 
Core::CameraGetCamera ()
 
PlayerGetPlayer ()
 
void SetMovementSpeed (float fMoveSpeed)
 
void SetFlyMode (bool bFlyMode)
 
void SetScreenWidth (int iWidth, int iHeight)
 
unsigned int GetScreenWidth () const
 
unsigned int GetScreenHeight () const
 
int GetFrameCount () const
 
void AddFrameCount ()
 
void ResetCounters ()
 
float GetTime () const
 
void SetDeltaTime (float fDelTime)
 
Core::Mat4 GetViewProjectionMatrix ()
 

Private Attributes

Core::Vec3 m_objCameraPos
 
std::unique_ptr< Playerm_pPlayer
 
float m_fOrthoSize = 10.0f
 
float m_fTimer = 0.0f
 
float m_fDeltaTime = 0.0f
 
int m_iFrameCount = 0
 
int m_iActiveThreads = 0
 
int m_iScreenWidth = 1920
 
int m_iScreenHeight = 1080
 
bool m_bEnableSIMD = true
 
bool m_bNeighborCullingEnabled = true
 
bool m_bFrustumCullingEnabled = true
 
bool m_bPerspective = true
 
bool m_bEscClickedFirstTime = false
 
bool m_bLMBClickedFirstTime = false
 
bool m_bRMBClickedFirstTime = false
 
bool m_bMMBClickedFirstTime = false
 
bool m_bFlyMode = false
 

Detailed Description

Processes keyboard and mouse input, managing player movement, camera state, and world interaction.

Constructor & Destructor Documentation

◆ InputHandler()

App::InputHandler::InputHandler ( const Core::Vec3 ObjStartPos)

Member Function Documentation

◆ AddFrameCount()

void App::InputHandler::AddFrameCount ( )
inline
Here is the caller graph for this function:

◆ GetActiveThreads()

int App::InputHandler::GetActiveThreads ( ) const
inline
Here is the caller graph for this function:

◆ GetCamera()

Core::Camera & App::InputHandler::GetCamera ( )
inline
Here is the caller graph for this function:

◆ GetFrameCount()

int App::InputHandler::GetFrameCount ( ) const
inline

◆ GetOrthoSize()

float App::InputHandler::GetOrthoSize ( ) const
inline

◆ GetPlayer()

Player * App::InputHandler::GetPlayer ( )
inline

◆ GetScreenHeight()

unsigned int App::InputHandler::GetScreenHeight ( ) const
inline
Here is the caller graph for this function:

◆ GetScreenWidth()

unsigned int App::InputHandler::GetScreenWidth ( ) const
inline
Here is the caller graph for this function:

◆ GetTime()

float App::InputHandler::GetTime ( ) const
inline
Here is the caller graph for this function:

◆ GetViewProjectionMatrix()

Core::Mat4 App::InputHandler::GetViewProjectionMatrix ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFrustumCullingEnabled()

bool App::InputHandler::IsFrustumCullingEnabled ( ) const
inline
Here is the caller graph for this function:

◆ IsLMBClickedFirstTime()

bool App::InputHandler::IsLMBClickedFirstTime ( ) const
inline

◆ IsNeighborCullingEnabled()

bool App::InputHandler::IsNeighborCullingEnabled ( ) const
inline
Here is the caller graph for this function:

◆ IsPerspective()

bool App::InputHandler::IsPerspective ( ) const
inline
Here is the caller graph for this function:

◆ IsSIMDEnabled()

bool App::InputHandler::IsSIMDEnabled ( ) const
inline
Here is the caller graph for this function:

◆ ProcessFirePreviewAndFire()

RayHit App::InputHandler::ProcessFirePreviewAndFire ( ChunkManager objChunkManager,
const Core::Mat4 viewProjection 
)

Raycasts into the world to preview, place, destroy, or inject heat into blocks.

Returns
RayHit Result of the raycast collision for UI/logic processing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessInput()

void App::InputHandler::ProcessInput ( GLFWwindow *  pWindow,
ChunkManager objChunkManager,
float  fDeltaTime 
)

Polls and processes raw input events to update global application state.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetCounters()

void App::InputHandler::ResetCounters ( )
Here is the caller graph for this function:

◆ SetActiveThreads()

void App::InputHandler::SetActiveThreads ( int  iCt)
inline
Here is the caller graph for this function:

◆ SetDeltaTime()

void App::InputHandler::SetDeltaTime ( float  fDelTime)
Here is the caller graph for this function:

◆ SetEnableSIMD()

void App::InputHandler::SetEnableSIMD ( bool  bValue)
inline
Here is the caller graph for this function:

◆ SetFlyMode()

void App::InputHandler::SetFlyMode ( bool  bFlyMode)
inline
Here is the caller graph for this function:

◆ SetFrustumCullingEnable()

void App::InputHandler::SetFrustumCullingEnable ( bool  bValue)
inline
Here is the caller graph for this function:

◆ SetLMBClickedFirstTime()

void App::InputHandler::SetLMBClickedFirstTime ( bool  bValue)
inline

◆ SetMovementSpeed()

void App::InputHandler::SetMovementSpeed ( float  fMoveSpeed)
inline
Here is the caller graph for this function:

◆ SetNeighborCullingEnable()

void App::InputHandler::SetNeighborCullingEnable ( bool  bValue)
inline
Here is the caller graph for this function:

◆ SetOrthoSize()

void App::InputHandler::SetOrthoSize ( float  fValue)
inline

◆ SetPerspective()

void App::InputHandler::SetPerspective ( bool  bValue)
inline

◆ SetScreenWidth()

void App::InputHandler::SetScreenWidth ( int  iWidth,
int  iHeight 
)
inline
Here is the caller graph for this function:

◆ UpdatePlayerPhysics()

void App::InputHandler::UpdatePlayerPhysics ( float  fDeltaTime,
const ChunkManager objChunkManager 
)

Updates player movement and collision based on elapsed time.

Here is the caller graph for this function:

Member Data Documentation

◆ m_bEnableSIMD

bool App::InputHandler::m_bEnableSIMD = true
private

◆ m_bEscClickedFirstTime

bool App::InputHandler::m_bEscClickedFirstTime = false
private

◆ m_bFlyMode

bool App::InputHandler::m_bFlyMode = false
private

◆ m_bFrustumCullingEnabled

bool App::InputHandler::m_bFrustumCullingEnabled = true
private

◆ m_bLMBClickedFirstTime

bool App::InputHandler::m_bLMBClickedFirstTime = false
private

◆ m_bMMBClickedFirstTime

bool App::InputHandler::m_bMMBClickedFirstTime = false
private

◆ m_bNeighborCullingEnabled

bool App::InputHandler::m_bNeighborCullingEnabled = true
private

◆ m_bPerspective

bool App::InputHandler::m_bPerspective = true
private

◆ m_bRMBClickedFirstTime

bool App::InputHandler::m_bRMBClickedFirstTime = false
private

◆ m_fDeltaTime

float App::InputHandler::m_fDeltaTime = 0.0f
private

◆ m_fOrthoSize

float App::InputHandler::m_fOrthoSize = 10.0f
private

◆ m_fTimer

float App::InputHandler::m_fTimer = 0.0f
private

◆ m_iActiveThreads

int App::InputHandler::m_iActiveThreads = 0
private

◆ m_iFrameCount

int App::InputHandler::m_iFrameCount = 0
private

◆ m_iScreenHeight

int App::InputHandler::m_iScreenHeight = 1080
private

◆ m_iScreenWidth

int App::InputHandler::m_iScreenWidth = 1920
private

◆ m_objCameraPos

Core::Vec3 App::InputHandler::m_objCameraPos
private

◆ m_pPlayer

std::unique_ptr<Player> App::InputHandler::m_pPlayer
private

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