A simple point class. More...
#include <MDPoint.h>
Public Member Functions | |
CMDPoint () | |
Default constructor. More... | |
CMDPoint (int nDimensions) | |
Constructor for a point with custom dimension. More... | |
const int | GetNDimensions () const |
Getter for the number of dimensions. | |
const float | GetCoordinate (int nth) const |
Getter for the value of the nth dimension of the point. | |
void | SetCoordinate (int nth, float value) |
Setter for the value of the nth dimension of the point. | |
Private Attributes | |
int | m_nDimensions |
float * | m_coordinate |
A simple point class.
Has support for a variable number of dimensions.
CMDPoint::CMDPoint | ( | ) |
Default constructor.
Constructs a point with dimension 2 and both dimension values equal to 0.0.
CMDPoint::CMDPoint | ( | int | nDimensions | ) |
Constructor for a point with custom dimension.
[in] | nDimensions | the number of dimensions the point exists in |