#include <Point3f.h>
Public Member Functions | |
Point3f (void) | |
Point3f (float ax, float ay, float az) | |
~Point3f (void) | |
Point3f & | operator= (const Point3f &p) |
Point3f & | operator+= (const Point3f &p) |
Point3f & | operator *= (float s) |
Point3f | operator+ (const Point3f &p) const |
Point3f | operator * (float s) const |
void | convertToArray (float *arrayPoint) |
void | print () |
Public Attributes | |
float | x |
float | y |
float | z |
Point3f::Point3f | ( | void | ) |
Constructs a 3D point with float elements with initial value equal to zero.
Point3f::Point3f | ( | float | ax, | |
float | ay, | |||
float | az | |||
) |
Constructs a 3D point with float values as given by the arguments.
ax | the x-coordinate value. | |
ay | the y-coordinate value. | |
az | the z-coordinate value. |
Point3f::~Point3f | ( | void | ) |
Destroys this point object.
Adds the point p to the current point.
p | the point to be added to this one. |
Point3f& Point3f::operator *= | ( | float | s | ) | [inline] |
Multiples this point by the value s.
s | the value to be multiplied by this points. |
Returns the result of adding the point p to the current point.
p | the point to be added to this one. |
Point3f Point3f::operator * | ( | float | s | ) | const [inline] |
Returns the result of multiplying this point by the scalar s.
s | the scalar value to multiplied by this point. |
void Point3f::convertToArray | ( | float * | arrayPoint | ) | [inline] |
Converts the contents of this point into an array of 3 floats.
arrayPoint | the array of 3 floats where the contents of this point will be placed. |
void Point3f::print | ( | ) |
Prints this point on the console for debugging purposes.
float Point3f::x |
The x-coordinate of this point.
float Point3f::y |
The y-coordinate of this point.
float Point3f::z |
The z-coordinate of this point.