<commit_before>#include "stdafx.h"
#include "camera.h"

Camera::Camera(DeviceResources* resources)
{
	m_pDeviceResources = resources;

	XMVECTORF32 eye = { 0.0f, 5.0f, -10.0, 0.0f };
	XMVECTORF32 at = { 0.0f, 0.0f, 0.0f, 0.0f };
	XMVECTORF32 up = { 0.0f, 1.0f, 0.0f, 0.0f };

	m_eyePosition = &eye;
	m_focusPosition = &at;
	m_upDirection = &up;
}

Camera::~Camera()
{
}

void Camera::Initialize()
{
	float aspectRatio = GetAspectRatio();
	float fieldOfView = GetFieldOfView();

	m_pDeviceResources->ConstBufferData = new ConstantBufferData();

	m_pDeviceResources->ConstBufferData->view = GetViewMatrix();
	m_pDeviceResources->ConstBufferData->projection = GetProjectionMatrix();
}

XMFLOAT4X4 Camera::GetViewMatrix()
{
	XMFLOAT4X4 view;
	auto matrix = XMMatrixTranspose(XMMatrixLookAtRH(*m_eyePosition, *m_focusPosition, *m_upDirection));
	XMStoreFloat4x4(&view, matrix);
	return view;
}

XMFLOAT4X4 Camera::GetProjectionMatrix()
{
	XMFLOAT4X4 projection;
	auto matrix = XMMatrixTranspose(XMMatrixPerspectiveFovRH(GetFieldOfView(), GetAspectRatio(), m_pDeviceResources->NearZ, m_pDeviceResources->FarZ));
	XMStoreFloat4x4(&projection, matrix);
	return projection;
}

void Camera::RotateHorizontal(float Angle)
{

}

void Camera::RotateVertical(float Angle)
{

}

void Camera::MoveX(float Angle)
{

}

void Camera::MoveY(float Angle)
{

}

void Camera::MoveZ(float Angle)
{

}<commit_msg>refac<commit_after>#include "stdafx.h"
#include "camera.h"

Camera::Camera(DeviceResources* resources)
{
	m_pDeviceResources = resources;

	XMVECTORF32 eyePosition		= { 0.0f, 5.0f, -10.0, 0.0f };
	XMVECTORF32 focusPosition	= { 0.0f, 0.0f, 0.0f, 0.0f };
	XMVECTORF32 upDirection		= { 0.0f, 1.0f, 0.0f, 0.0f };

	m_eyePosition = &eyePosition;
	m_focusPosition = &focusPosition;
	m_upDirection = &upDirection;
}

Camera::~Camera()
{
}

void Camera::Initialize()
{
	float aspectRatio = GetAspectRatio();
	float fieldOfView = GetFieldOfView();

	m_pDeviceResources->ConstBufferData = new ConstantBufferData();

	m_pDeviceResources->ConstBufferData->view = GetViewMatrix();
	m_pDeviceResources->ConstBufferData->projection = GetProjectionMatrix();
}

XMFLOAT4X4 Camera::GetViewMatrix()
{
	XMFLOAT4X4 view;
	auto matrix = XMMatrixTranspose(XMMatrixLookAtRH(*m_eyePosition, *m_focusPosition, *m_upDirection));
	XMStoreFloat4x4(&view, matrix);
	return view;
}

XMFLOAT4X4 Camera::GetProjectionMatrix()
{
	XMFLOAT4X4 projection;
	auto matrix = XMMatrixTranspose(XMMatrixPerspectiveFovRH(GetFieldOfView(), GetAspectRatio(), m_pDeviceResources->NearZ, m_pDeviceResources->FarZ));
	XMStoreFloat4x4(&projection, matrix);
	return projection;
}

void Camera::RotateHorizontal(float Angle)
{

}

void Camera::RotateVertical(float Angle)
{

}

void Camera::MoveX(float Angle)
{

}

void Camera::MoveY(float Angle)
{

}

void Camera::MoveZ(float Angle)
{

}
{'fraction_non_alphanumeric': 0.12811867835468643, 'fraction_numerical': 0.02899527983816588, 'mean_word_length': 4.673040152963671, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '313580', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1111, 'n_words': 180}