-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCamera.cpp
61 lines (56 loc) · 1.2 KB
/
Camera.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "Camera.h"
#include "Vertex.h"
Camera::Camera(){};
Camera::Camera(Vertex position, Vertex image, float width, float height, int dpi):
position(position), image(image), width(width), height(height), dpi(dpi){
}
void Camera::SetDpi(int dpi)
{
this->dpi = dpi;
}
void Camera::SetHeight(float height)
{
this->height = height;
}
void Camera::SetImage(const Vertex& image)
{
this->image = image;
}
void Camera::SetPosition(const Vertex& position)
{
this->position = position;
}
void Camera::SetWidth(float width)
{
this->width = width;
}
int Camera::GetDpi() const
{
return dpi;
}
float Camera::GetHeight() const
{
return height;
}
const Vertex& Camera::GetImage() const
{
return image;
}
const Vertex& Camera::GetPosition() const
{
return position;
}
float Camera::GetWidth() const
{
return width;
}
std::ostream& operator<<(std::ostream& os, const Camera &obj) {
os << "<Camera("
<< "\n\b position: " << obj.GetPosition() << ")"
<< "\n\b image: " << obj.GetImage() << ")"
<< "\n\b width: " << obj.GetWidth() << ")"
<< "\n\b height: " << obj.GetHeight() << ")"
<< "\n\b dpi: " << obj.GetDpi() << ")"
<< "\n\b)\n\b";
return os;
}