AlpacaLibary  1.63
A closed source C++ bot for OSRS
Box.hpp
Go to the documentation of this file.
1 #ifndef BOX_HPP_INCLUDED
2 #define BOX_HPP_INCLUDED
3 
4 #include <iostream>
5 #include <cstdint>
6 #include "Point.hpp"
7 
8 class Point;
9 
10 class Box
11 {
12  public:
13  Box();
20  Box(std::int32_t X, std::int32_t Y, std::int32_t Width, std::int32_t Height);
21  Box(const Box& B);
22 
23  std::int32_t X;
24  std::int32_t Y;
25  std::int32_t Width;
26  std::int32_t Height;
27 
28  bool Contains(const Point& P) const;
29  bool Contains(const Box& B) const;
30  bool Contains(std::int32_t X, std::int32_t Y) const;
31 
32  Point GetMiddle() const;
33  std::int32_t GetX2() const;
34  std::int32_t GetY2() const;
35 
36  bool OnScreen() const;
37  bool IsValid() const;
38 
40  Point GetBinomialRandomPoint(double ProbabilityX, double ProbabilityY) const;
41  Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const;
42 
43  Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, double PointGenAccuracy) const;
45  Point GetProfileHybridRandomPoint(double PointGenAccuracy) const;
46 
47  bool operator==(const Box& B) const;
48  bool operator!=(const Box& B) const;
49 
50  friend std::ostream& operator<<(std::ostream& OS, const Box& B);
51  operator bool() const;
52 
53  ~Box();
54 };
55 
56 #endif // BOX_HPP_INCLUDED
Definition: Box.hpp:11
friend std::ostream & operator<<(std::ostream &OS, const Box &B)
Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, double PointGenAccuracy) const
bool IsValid() const
std::int32_t Y
The top-left y-axis coordinate.
Definition: Box.hpp:24
Point GetBinomialRandomPoint(double ProbabilityX, double ProbabilityY) const
std::int32_t X
The top-left x-axis coordinate.
Definition: Box.hpp:23
bool Contains(const Point &P) const
std::int32_t Width
Definition: Box.hpp:25
std::int32_t GetX2() const
bool Contains(const Box &B) const
~Box()
Point GetUniformRandomPoint() const
bool Contains(std::int32_t X, std::int32_t Y) const
Box(const Box &B)
std::int32_t Height
Definition: Box.hpp:26
std::int32_t GetY2() const
bool OnScreen() const
Box(std::int32_t X, std::int32_t Y, std::int32_t Width, std::int32_t Height)
bool operator!=(const Box &B) const
Point GetMiddle() const
bool operator==(const Box &B) const
Point GetProfileHybridRandomPoint(double PointGenAccuracy) const
Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const
Point GetProfileHybridRandomPoint() const
Definition: Point.hpp:10