Lugdunum
0.1.0
include
lug
Graphics
Builder
Camera.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
#include <
lug/Graphics/Resource.hpp
>
6
#include <
lug/Graphics/Render/Camera/Camera.hpp
>
7
#include <
lug/System/Debug.hpp
>
8
9
namespace
lug
{
10
namespace
Graphics
{
11
12
class
Renderer
;
13
14
namespace
Builder {
15
16
class
LUG_GRAPHICS_API
Camera
{
17
public
:
18
enum class
Type
: uint8_t {
19
Perspective,
20
Orthographic
21
};
22
23
public
:
24
explicit
Camera
(
Renderer
& renderer);
25
26
Camera
(
const
Camera
&) =
delete
;
27
Camera
(
Camera
&&) =
delete
;
28
29
Camera
& operator=(
const
Camera
&) =
delete
;
30
Camera
& operator=(
Camera
&&) =
delete
;
31
32
~
Camera
() =
default
;
33
38
void
setName(
const
std::string& name);
39
void
setType(
Type
type);
40
41
// Perspective
42
void
setFovY(
float
fovy);
43
void
setAspectRatio(
float
aspectRatio);
44
45
// Orthographic
46
void
setXMag(
float
xmag);
47
void
setYMag(
float
ymag);
48
49
// Both
50
void
setZNear(
float
znear);
51
void
setZFar(
float
zfar);
52
53
Resource::SharedPtr<Render::Camera::Camera>
build
();
54
55
protected
:
56
Renderer
&
_renderer
;
57
58
std::string
_name
;
59
Type
_type{Type::Perspective};
60
61
// Perspective
62
float
_fovy{0.0f};
63
float
_aspectRatio{0.0f};
64
65
// Orthographic
66
float
_xmag{0.0f};
67
float
_ymag{0.0f};
68
69
// Both
70
float
_znear{0.0f};
71
float
_zfar{0.0f};
72
};
73
74
#include <
lug/Graphics/Builder/Camera.inl
>
75
76
}
// Builder
77
}
// Graphics
78
}
// lug
Camera.hpp
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
lug::Graphics::Resource::SharedPtr
Dummy class for a shared pointer.
Definition:
Resource.hpp:66
Resource.hpp
lug::Graphics::Vulkan::Builder::Material::build
Resource::SharedPtr< lug::Graphics::Render::Material > build(const ::lug::Graphics::Builder::Material &builder)
Definition:
Material.cpp:14
lug::Graphics::Builder::Camera::_name
std::string _name
Definition:
Camera.hpp:58
lug::Graphics::Builder::Camera::_renderer
Renderer & _renderer
Definition:
Camera.hpp:56
Camera.inl
lug::Graphics::Renderer
Definition:
Renderer.hpp:18
lug
Definition:
Application.hpp:11
lug::Graphics::Builder::Camera::Type
Type
Definition:
Camera.hpp:18
Debug.hpp
lug::Graphics::Graphics
Class for graphics.
Definition:
Graphics.hpp:25
lug::Graphics::Builder::Camera
Definition:
Camera.hpp:16
Generated by
1.8.13