Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
|
#include <point.h>
Public Member Functions | |
FloatPoint () | |
A constructor for a point at 0,0. | |
FloatPoint (float in_x, float in_y) | |
FloatPoint (const PP_FloatPoint &point) | |
~FloatPoint () | |
Destructor. | |
operator PP_FloatPoint () const | |
const PP_FloatPoint & | pp_float_point () const |
PP_FloatPoint & | pp_float_point () |
float | x () const |
void | set_x (float in_x) |
float | y () const |
void | set_y (float in_y) |
FloatPoint | operator+ (const FloatPoint &other) const |
FloatPoint | operator- (const FloatPoint &other) const |
FloatPoint & | operator+= (const FloatPoint &other) |
FloatPoint & | operator-= (const FloatPoint &other) |
void | swap (FloatPoint &other) |
A 2 dimensional floating-point point with 0,0 being the upper-left starting coordinate.
|
inline |
A constructor accepting two values for x and y and converting them to a FloatPoint.
[in] | in_x | An value representing a horizontal coordinate of a point, starting with 0 as the left-most coordinate. |
[in] | in_y | An value representing a vertical coordinate of a point, starting with 0 as the top-most coordinate. |
|
inline |
A constructor accepting a pointer to a PP_FloatPoint and converting the PP_Point to a Point. This is an implicit conversion constructor.
[in] | point | A PP_FloatPoint. |
|
inline |
A function allowing implicit conversion of a FloatPoint to a PP_FloatPoint.
|
inline |
|
inline |
|
inline |
Subtracts one Point from another Point by subtracting their x values and y values. Returns a new point with the result.
[in] | other | A FloatPoint. |
|
inline |
|
inline |
Getter function for returning the internal PP_FloatPoint struct.
|
inline |
Getter function for returning the internal PP_Point struct.
|
inline |
Setter function for setting the value of x.
[in] | in_x | A new x value. |
|
inline |
Setter function for setting the value of y.
[in] | in_y | A new y value. |
|
inline |
Swaps the coordinates of two Points.
[in] | other | A Point. |
|
inline |
Getter function for returning the value of x.
|
inline |
Getter function for returning the value of y.