-
Notifications
You must be signed in to change notification settings - Fork 1
/
Camera.cs
97 lines (86 loc) · 1.78 KB
/
Camera.cs
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
94
95
96
97
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace VoxelSpaceSharp
{
public class Camera
{
private const int FOV = 90;
private PointF position;
private int horizon;
private int angle;
private int height;
public PointF Position
{
get
{
return position;
}
set
{
position = value;
}
}
public int Horizon
{
get
{
return horizon;
}
set
{
horizon = value;
}
}
public int Angle
{
get
{
return angle;
}
set
{
angle = value;
}
}
public int Height
{
get
{
return height;
}
set
{
height = value;
}
}
public void MovePositionX(int xMovement)
{
position.X += xMovement;
}
public void MovePositionY(int yMovement)
{
position.Y += yMovement;
}
public void ChangeHorizon(int offset)
{
horizon += offset;
}
public void ChangeDegree(int offset)
{
angle += offset;
}
public void ChangeHeight(int offset)
{
height += offset;
}
public Camera(int horizon, PointF position, int angle)
{
this.horizon = horizon;
this.position = position;
this.angle = angle;
}
}
}