<commit_before>#ifndef CAMERA_H
#define CAMERA_H

#include "../Math/PacMath.h"

#include "../Common.h"
#include "../Component.h"
#include "../Singleton.h"

#include "../Messaging/ObserverDirector.h"
#include "../Messaging/MsgMouseMove.h"
#include "../Messaging/MsgKeyboard.h"
#include "../Messaging/MsgCamera.h"

const static float STEP_SCALE = 0.1f;

class Camera : public Component
{
private:
	float fov;
	float aspect; 
	float zNear; 
	float zFar;

	unsigned int screenWidth;
	unsigned int screenHeight;
protected:
	VecF3 position;
	VecF3 right;
	VecF3 up;
	VecF3 look;

	MatF4 view;
	MatF4 projection;

	virtual void updateProj() = 0;
	virtual void updateView() = 0;

	void msgMouseMove(Msg* msg);
	virtual void mouse(const int dX, const int dY)	= 0;

	void msgKeyboard(Msg* msg);
	virtual void keyboard(KEY key)		= 0;

	virtual void strafe(const float velocity)	= 0;
	virtual void walk(const float velocity)		= 0;
	virtual void pitch(const float angle)		= 0;
	virtual void yaw(const float angle)			= 0;

	//Protected gets
	const float FOV()		{ return fov;		}
	const float Aspect()	{ return aspect;	}
	const float ZNear()		{ return zNear;		}
	const float ZFar()		{ return zFar;		}
	const unsigned int ScreenWidth()	{ return screenWidth;	}
	const unsigned int ScreenHeight()	{ return screenHeight;	}

	//Protected sets
	void FOV(const float fov)		{ this->fov		= fov;		}
	void Aspect(const float aspect)	{ this->aspect	= aspect;	}
	void ZNear(const float zNear)	{ this->zNear	= zNear;	}
	void ZFar(const float zFar)		{ this->zFar	= zFar;		}
	void ScreenWidth(const unsigned int screenWidth)	{ this->screenWidth = screenWidth;		}<commit_msg>Mouse movement parameters now sent in floats<commit_after>#ifndef CAMERA_H
#define CAMERA_H

#include "../Math/PacMath.h"

#include "../Common.h"
#include "../Component.h"
#include "../Singleton.h"

#include "../Messaging/ObserverDirector.h"
#include "../Messaging/MsgMouseMove.h"
#include "../Messaging/MsgKeyboard.h"
#include "../Messaging/MsgCamera.h"

const static float STEP_SCALE = 0.1f;

class Camera : public Component
{
private:
	float fov;
	float aspect; 
	float zNear; 
	float zFar;

	unsigned int screenWidth;
	unsigned int screenHeight;
protected:
	VecF3 position;
	VecF3 right;
	VecF3 up;
	VecF3 look;

	MatF4 view;
	MatF4 projection;

	virtual void updateProj() = 0;
	virtual void updateView() = 0;

	void msgMouseMove(Msg* msg);
	virtual void mouse(const float dX, const float dY)	= 0;

	void msgKeyboard(Msg* msg);
	virtual void keyboard(KEY key)		= 0;

	virtual void strafe(const float velocity)	= 0;
	virtual void walk(const float velocity)		= 0;
	virtual void pitch(const float angle)		= 0;
	virtual void yaw(const float angle)			= 0;

	//Protected gets
	const float FOV()		{ return fov;		}
	const float Aspect()	{ return aspect;	}
	const float ZNear()		{ return zNear;		}
	const float ZFar()		{ return zFar;		}
	const unsigned int ScreenWidth()	{ return screenWidth;	}
	const unsigned int ScreenHeight()	{ return screenHeight;	}

	//Protected sets
	void FOV(const float fov)		{ this->fov		= fov;		}
	void Aspect(const float aspect)	{ this->aspect	= aspect;	}
	void ZNear(const float zNear)	{ this->zNear	= zNear;	}
	void ZFar(const float zFar)		{ this->zFar	= zFar;		}
	void ScreenWidth(const unsigned int screenWidth)	{ this->screenWidth = screenWidth;		}
{'fraction_non_alphanumeric': 0.12051822838204278, 'fraction_numerical': 0.009641458270563423, 'mean_word_length': 4.022692889561271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3922611', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1191, 'n_words': 358}