23 lines
521 B
C++
23 lines
521 B
C++
#pragma once
|
|
#include <d3d11.h>
|
|
#include <DirectXMath.h>
|
|
|
|
using namespace DirectX;
|
|
|
|
class Camera
|
|
{
|
|
public:
|
|
UINT init(UINT width, UINT height);
|
|
void update(FLOAT dt);
|
|
void deInit();
|
|
|
|
const XMFLOAT4X4& getViewMatrix() const { return _viewMatrix; }
|
|
const XMFLOAT4X4& getProjectionMatrix() const { return _projectionMatrix; }
|
|
const XMFLOAT3 getCameraPosition() const { return XMFLOAT3(_viewMatrix._14, _viewMatrix._24, _viewMatrix._34); }
|
|
|
|
private:
|
|
XMFLOAT4X4 _viewMatrix = {};
|
|
XMFLOAT4X4 _projectionMatrix = {};
|
|
};
|
|
|