-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisor.cpp
More file actions
43 lines (34 loc) · 975 Bytes
/
Copy pathVisor.cpp
File metadata and controls
43 lines (34 loc) · 975 Bytes
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
#include "Visor.h"
Visor::Visor(const int trueCoordinateX, const int trueCoordinateY, const int currentPosition, const int maxAngleError)
: m_position(currentPosition),
m_maxAngleError(maxAngleError),
m_point(DefinedPoint(trueCoordinateX, trueCoordinateY)),
m_vectorCoordinate(Vector(m_point, m_position)),
m_angle(Angle(m_vectorCoordinate)),
m_positiveErrorRay(Ray(m_vectorCoordinate, m_angle, m_maxAngleError, Ray::POSITIVE)),
m_negativeErrorRay(Ray(m_vectorCoordinate, m_angle, m_maxAngleError, Ray::NEGATIVE))
{
};
Ray Visor::GetPositiveErrorRay() const
{
return m_positiveErrorRay;
}
Ray Visor::GetNegativeErrorRay() const
{
return m_negativeErrorRay;
}
int Visor::GetMaxAngleErorr() const
{
return m_maxAngleError;
}
int Visor::GetAngle() const
{
return m_angle.GetAngle();
}
int Visor::GetPosition() const
{
return m_position;
}
void Visor::Recalculate(int position)
{
}