AlpacaLibary  1.63
A closed source C++ bot for OSRS
Point Class Reference

#include <Point.hpp>

Public Member Functions

 Point ()
 
 Point (std::int32_t X, std::int32_t Y)
 
 Point (const Point &P)
 
double DistanceFrom (const Point &P) const
 
bool InBox (const Box &B) const
 
bool InCircle (const Point &P, std::int32_t Radius) const
 
bool IsNegative () const
 
bool IsPositive () const
 
bool OnScreen () const
 
bool operator== (const Point &P) const
 
bool operator!= (const Point &P) const
 
Point operator+ (const Point &P) const
 
Point operator- (const Point &P) const
 
Pointoperator+= (const Point &P)
 
Pointoperator-= (const Point &P)
 
 operator bool () const
 
 ~Point ()
 

Public Attributes

std::int32_t X
 The X-axis coordinate. More...
 
std::int32_t Y
 The Y-axis coordinate. More...
 

Friends

std::ostream & operator<< (std::ostream &OS, const Point &P)
 

Detailed Description

Definition at line 9 of file Point.hpp.

Constructor & Destructor Documentation

◆ Point() [1/3]

Point::Point ( )

◆ Point() [2/3]

Point::Point ( std::int32_t  X,
std::int32_t  Y 
)
Parameters
XThe X-axis coordinate
YThe Y-axis coordinate

◆ Point() [3/3]

Point::Point ( const Point P)

◆ ~Point()

Point::~Point ( )

Member Function Documentation

◆ DistanceFrom()

double Point::DistanceFrom ( const Point P) const

◆ InBox()

bool Point::InBox ( const Box B) const

◆ InCircle()

bool Point::InCircle ( const Point P,
std::int32_t  Radius 
) const
Parameters
PThe center of the circle
RadiusThe radius of the circle
Returns
True if this lies within the circle

◆ IsNegative()

bool Point::IsNegative ( ) const
Returns
True if either the x-axis or y-axis coordinate are negative

◆ IsPositive()

bool Point::IsPositive ( ) const
Returns
True if the x-axis or y-axis coordinates are both positive

◆ OnScreen()

bool Point::OnScreen ( ) const
Returns
True if the point is within the client canvas bounds

◆ operator bool()

Point::operator bool ( ) const
Returns
True if this is not negative
See also
IsNegative

◆ operator!=()

bool Point::operator!= ( const Point P) const

◆ operator+()

Point Point::operator+ ( const Point P) const

◆ operator+=()

Point& Point::operator+= ( const Point P)

◆ operator-()

Point Point::operator- ( const Point P) const

◆ operator-=()

Point& Point::operator-= ( const Point P)

◆ operator==()

bool Point::operator== ( const Point P) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  OS,
const Point P 
)
friend

Member Data Documentation

◆ X

std::int32_t Point::X

The X-axis coordinate.

Definition at line 20 of file Point.hpp.

◆ Y

std::int32_t Point::Y

The Y-axis coordinate.

Definition at line 21 of file Point.hpp.


The documentation for this class was generated from the following file: