Public Member Functions
Point () | |
Point (int32_t in_x, int32_t in_y) | |
Point (const PP_Point &point) | |
~Point () | |
operator PP_Point () const | |
const PP_Point & | pp_point () const |
PP_Point & | pp_point () |
int32_t | x () const |
void | set_x (int32_t in_x) |
int32_t | y () const |
void | set_y (int32_t in_y) |
Point | operator+ (const Point &other) const |
Point | operator- (const Point &other) const |
Point & | operator+= (const Point &other) |
Point & | operator-= (const Point &other) |
void | swap (Point &other) |
Detailed Description
A 2 dimensional point with 0,0 being the upper-left starting coordinate.
Constructor & Destructor Documentation
pp::Point::Point | ( | ) | [inline] |
The default constructor for a point at 0,0.
pp::Point::Point | ( | int32_t | in_x, |
int32_t | in_y | ||
) | [inline] |
A constructor accepting two int32_t values for x and y and converting them to a Point.
- Parameters:
[in] in_x An int32_t value representing a horizontal coordinate of a point, starting with 0 as the left-most coordinate. [in] in_y An int32_t value representing a vertical coordinate of a point, starting with 0 as the top-most coordinate.
pp::Point::Point | ( | const PP_Point & | point | ) | [inline] |
A constructor accepting a pointer to a PP_Point and converting the PP_Point to a Point.
This is an implicit conversion constructor.
- Parameters:
[in] point A pointer to a PP_Point.
pp::Point::~Point | ( | ) | [inline] |
Destructor.
Member Function Documentation
pp::Point::operator PP_Point | ( | ) | const [inline] |
const PP_Point& pp::Point::pp_point | ( | ) | const [inline] |
Getter function for returning the internal PP_Point struct.
- Returns:
- A const reference to the internal PP_Point struct.
PP_Point& pp::Point::pp_point | ( | ) | [inline] |
Getter function for returning the internal PP_Point struct.
- Returns:
- A mutable reference to the PP_Point struct.
void pp::Point::set_x | ( | int32_t | in_x | ) | [inline] |
Setter function for setting the value of x.
- Parameters:
[in] in_x A new x value.
void pp::Point::set_y | ( | int32_t | in_y | ) | [inline] |
Setter function for setting the value of y.
- Parameters:
[in] in_y A new y value.
void pp::Point::swap | ( | Point & | other | ) | [inline] |
Swaps the coordinates of two Points.
- Parameters:
[in] other A Point.
int32_t pp::Point::x | ( | ) | const [inline] |
Getter function for returning the value of x.
- Returns:
- The value of x for this Point.
int32_t pp::Point::y | ( | ) | const [inline] |
Getter function for returning the value of y.
- Returns:
- The value of y for this Point.
The documentation for this class was generated from the following file: