Pepper_31_C++_interfaces
|
#include <point.h>
Public Member Functions | |
FloatPoint () | |
A constructor for a point at 0,0. More... | |
FloatPoint (float in_x, float in_y) | |
FloatPoint (const PP_FloatPoint &point) | |
~FloatPoint () | |
Destructor. More... | |
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 for a point at 0,0.
Definition at line 158 of file point.h.
Referenced by operator+(), and operator-().
|
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 |
|
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. |
Definition at line 248 of file point.h.
References FloatPoint(), x(), and y().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Getter function for returning the value of x.
Definition at line 211 of file point.h.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator==(), and swap().
|
inline |
Getter function for returning the value of y.
Definition at line 223 of file point.h.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator==(), and swap().