2020-06-21 20:57:35 +02:00
|
|
|
#pragma once
|
2020-07-01 08:46:07 +02:00
|
|
|
#include <vector>
|
|
|
|
#include <d3d11.h>
|
|
|
|
#include <SimpleMath.h>
|
|
|
|
#include "camera.h"
|
|
|
|
#include "Frustum.h"
|
|
|
|
#include "ConstantBuffers/CameraMatrixBuffer.h"
|
2020-06-21 20:57:35 +02:00
|
|
|
namespace T5M::Renderer {
|
2020-07-01 08:46:07 +02:00
|
|
|
struct RendererStatic;
|
|
|
|
struct RendererItem;
|
|
|
|
struct RendererLight;
|
|
|
|
struct RendererEffect;
|
|
|
|
struct RendererRoom;
|
|
|
|
using DirectX::SimpleMath::Vector3;
|
|
|
|
using DirectX::SimpleMath::Vector2;
|
|
|
|
using DirectX::SimpleMath::Matrix;
|
|
|
|
struct RenderViewCamera {
|
|
|
|
Matrix ViewProjection;
|
|
|
|
Matrix View;
|
|
|
|
Matrix Projection;
|
|
|
|
Vector3 WorldPosition;
|
|
|
|
Vector3 WorldDirection;
|
|
|
|
Vector2 ViewSize;
|
|
|
|
Vector2 InvViewSize;
|
|
|
|
int RoomNumber;
|
|
|
|
Frustum frustum;
|
|
|
|
RenderViewCamera(CAMERA_INFO* cam, float roll, float fov, float n, float f, int w, int h);
|
|
|
|
RenderViewCamera(const Vector3& pos, const Vector3& dir,const Vector3& up, int room,int width, int height,float fov,float n, float f);
|
|
|
|
};
|
|
|
|
struct RenderView {
|
|
|
|
RenderViewCamera camera;
|
2020-07-01 16:49:53 +02:00
|
|
|
D3D11_VIEWPORT viewport;
|
2020-07-01 08:46:07 +02:00
|
|
|
std::vector<RendererRoom*> roomsToDraw;
|
|
|
|
std::vector<RendererStatic*> staticsToDraw;
|
|
|
|
std::vector<RendererEffect*> effectsToDraw;
|
|
|
|
std::vector<RendererItem*> itemsToDraw;
|
|
|
|
std::vector<RendererLight*> lightsToDraw;
|
2020-07-01 21:13:07 +02:00
|
|
|
RenderView(CAMERA_INFO* cam, float roll, float fov, float nearPlane, float farPlane, int w, int h);
|
|
|
|
RenderView(const Vector3& pos, const Vector3& dir, const Vector3& up, int w, int h, int room, float nearPlane, float farPlane, float fov);
|
|
|
|
void fillConstantBuffer(CCameraMatrixBuffer& bufferToFill);
|
2020-07-01 08:46:07 +02:00
|
|
|
void clear();
|
2020-06-21 20:57:35 +02:00
|
|
|
};
|
|
|
|
}
|