-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewplane.cpp
More file actions
93 lines (77 loc) · 1.26 KB
/
viewplane.cpp
File metadata and controls
93 lines (77 loc) · 1.26 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include "viewplane.h"
#include "math.h"
Viewplane::Viewplane()
{
_width = 0;
_height = 0;
_pixel_size = 1;
_num_sample = 1;
_background.blacken();
_ref = Point3d();
_A = Vector3d();
_B = Vector3d();
}
Viewplane::Viewplane(int width, int height,
Vector3d A, Vector3d B)
{
_width = width;
_height = height;
_pixel_size = 1;
_A = A;
_B = B;
_background.blacken();
_n = A ^ B;
}
void Viewplane::set_pixel_size(float s)
{
_pixel_size = s;
}
Viewplane::~Viewplane()
{
//nothing
}
float Viewplane::pixel_size()
{
return _pixel_size;
}
int Viewplane::num_sample()
{
return _num_sample;
}
Pixel Viewplane::background()
{
return _background;
}
Vector3d Viewplane::A()
{
return _A;
}
Vector3d Viewplane::B()
{
return _B;
}
int Viewplane::height()
{
return _height;
}
int Viewplane::width()
{
return _width;
}
Point3d Viewplane::ref_point()
{
return _ref;
}
void Viewplane::set_background(Pixel bg)
{
_background = bg;
}
void Viewplane::set_ref(Point3d p)
{
_ref = p;
}
void Viewplane::resize(int width, int height)
{
_width = width;
_height = height;
}