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

Represents the user-controlled entity. Handles Camera synchronization and Input-to-Physics logic. More...

#include <src/world/Player.h>

Collaboration diagram for Player:
Collaboration graph

Public Member Functions

 Player (const Core::Vec3 &objStartPos)
 
void Update (float fDeltaTime, const ChunkManager &objChunkManager, bool bFlyMode=false)
 
void ProcessKeyboard (MovementDirection iDir, float fDeltaTime)
 
void ProcessMouseMovement (float fXOffset, float fYOffset, bool bConstraintPitch=true)
 
Core::CameraGetCamera ()
 
Core::Vec3 GetPosition () const
 
void SetMovementSpeed (float fMoveSpeed)
 

Private Attributes

Core::Camera m_objCamera
 
RigidBody m_objRigidBody
 
float m_fMoveSpeed = 5.0f
 
float m_fJumpSpeed = 8.0f
 
bool m_bIsGrounded = false
 
bool m_bFlyMode = false
 

Detailed Description

Represents the user-controlled entity. Handles Camera synchronization and Input-to-Physics logic.

Constructor & Destructor Documentation

◆ Player()

Player::Player ( const Core::Vec3 objStartPos)

Member Function Documentation

◆ GetCamera()

Core::Camera & Player::GetCamera ( )
inline

◆ GetPosition()

Core::Vec3 Player::GetPosition ( ) const
inline

◆ ProcessKeyboard()

void Player::ProcessKeyboard ( MovementDirection  iDir,
float  fDeltaTime 
)
Here is the call graph for this function:

◆ ProcessMouseMovement()

void Player::ProcessMouseMovement ( float  fXOffset,
float  fYOffset,
bool  bConstraintPitch = true 
)
Here is the call graph for this function:

◆ SetMovementSpeed()

void Player::SetMovementSpeed ( float  fMoveSpeed)
inline

◆ Update()

void Player::Update ( float  fDeltaTime,
const ChunkManager objChunkManager,
bool  bFlyMode = false 
)
Here is the call graph for this function:

Member Data Documentation

◆ m_bFlyMode

bool Player::m_bFlyMode = false
private

◆ m_bIsGrounded

bool Player::m_bIsGrounded = false
private

◆ m_fJumpSpeed

float Player::m_fJumpSpeed = 8.0f
private

◆ m_fMoveSpeed

float Player::m_fMoveSpeed = 5.0f
private

◆ m_objCamera

Core::Camera Player::m_objCamera
private

◆ m_objRigidBody

RigidBody Player::m_objRigidBody
private

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