A 2 dimensional point with 0,0 being the upper-left starting coordinate.
More...
#include <point.h>
A 2 dimensional point with 0,0 being the upper-left starting coordinate.
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::operator PP_Point |
( |
| ) |
const |
|
inline |
A function allowing implicit conversion of a Point to a PP_Point.
- Returns
- A Point.
Point pp::Point::operator+ |
( |
const Point & |
other | ) |
const |
|
inline |
Adds two Points (this and other) together by adding their x values and y values.
- Parameters
-
- Returns
- A new Point containing the result.
Point& pp::Point::operator+= |
( |
const Point & |
other | ) |
|
|
inline |
Adds two Points (this and other) together by adding their x and y values. Returns this point as the result.
- Parameters
-
- Returns
- This Point containing the result.
Point pp::Point::operator- |
( |
const Point & |
other | ) |
const |
|
inline |
Subtracts one Point from another Point by subtracting their x values and y values. Returns a new point with the result.
- Parameters
-
- Returns
- A new Point containing the result.
Point& pp::Point::operator-= |
( |
const Point & |
other | ) |
|
|
inline |
Subtracts one Point from another Point by subtracting their x values and y values. Returns this point as the result.
- Parameters
-
- Returns
- This Point containing the result.
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
-
void pp::Point::set_y |
( |
int32_t |
in_y | ) |
|
|
inline |
Setter function for setting the value of y.
- Parameters
-
void pp::Point::swap |
( |
Point & |
other | ) |
|
|
inline |
Swaps the coordinates of two Points.
- Parameters
-
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: