Refactors camera input handling for smoother and more intuitive control. This change introduces a dedicated CameraInput structure and updates the camera class to use it for movement and rotation based on user input. It removes the old position class camera related logic and integrates mouse delta for precise rotation control and scroll wheel for speed adjustments. Updates ImGui layout to reflect the new size for the docked space.
31 lines
685 B
C++
31 lines
685 B
C++
#ifndef _POSITIONCLASS_H_
|
|
#define _POSITIONCLASS_H_
|
|
|
|
|
|
//////////////
|
|
// INCLUDES //
|
|
//////////////
|
|
#include <math.h>
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// Class name: position_class
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
class position_class
|
|
{
|
|
public:
|
|
position_class();
|
|
position_class(const position_class&);
|
|
~position_class();
|
|
|
|
void SetFrameTime(float);
|
|
void GetRotation(float&, float&) const;
|
|
void GetPosition(float&, float&, float&) const;
|
|
|
|
private:
|
|
float m_frameTime;
|
|
float m_rotationY, m_rotationX;
|
|
float m_positionX, m_positionY, m_positionZ;
|
|
};
|
|
|
|
#endif |