AlpacaLibary  1.63
A closed source C++ bot for OSRS
Point.hpp
Go to the documentation of this file.
1 #ifndef POINT_HPP_INCLUDED
2 #define POINT_HPP_INCLUDED
3 
4 #include <cstdint>
5 #include "Box.hpp"
6 
7 class Box;
8 
9 class Point
10 {
11  public:
12  Point();
17  Point(std::int32_t X, std::int32_t Y);
18  Point(const Point& P);
19 
20  std::int32_t X;
21  std::int32_t Y;
22 
23  double DistanceFrom(const Point& P) const;
24 
25  bool InBox(const Box& B) const;
26 
32  bool InCircle(const Point& P, std::int32_t Radius) const;
33 
34  bool IsNegative() const;
35  bool IsPositive() const;
36  bool OnScreen() const;
37 
38  bool operator==(const Point& P) const;
39  bool operator!=(const Point& P) const;
40  Point operator+(const Point& P) const;
41  Point operator-(const Point& P) const;
42  Point& operator+=(const Point& P);
43  Point& operator-=(const Point& P);
44 
45  operator bool() const;
46  friend std::ostream& operator<<(std::ostream& OS, const Point& P);
47 
48  ~Point();
49 };
50 
51 #endif // POINT_HPP_INCLUDED
Definition: Box.hpp:11
Definition: Point.hpp:10
bool InBox(const Box &B) const
std::int32_t Y
The Y-axis coordinate.
Definition: Point.hpp:21
double DistanceFrom(const Point &P) const
bool operator!=(const Point &P) const
bool InCircle(const Point &P, std::int32_t Radius) const
Point & operator-=(const Point &P)
Point(std::int32_t X, std::int32_t Y)
Point operator-(const Point &P) const
Point(const Point &P)
bool IsNegative() const
friend std::ostream & operator<<(std::ostream &OS, const Point &P)
std::int32_t X
The X-axis coordinate.
Definition: Point.hpp:20
bool operator==(const Point &P) const
bool OnScreen() const
Point operator+(const Point &P) const
bool IsPositive() const
Point & operator+=(const Point &P)