The Point class defines a point in the plane.
More...
#include <geomtypes.h>
|
| Point () |
| Default constructor.
|
|
| Point (const double xv, const double yv) |
| Standard constructor. More...
|
|
bool | operator== (const Point &rhs) const |
| Comparison operator. Returns true if at same position. More...
|
|
bool | equals (const Point &rhs, double epsilon=0.0001) const |
| Comparison operator. Returns true if at same position, or at effectively the same position for a given value of epsilson. More...
|
|
bool | operator!= (const Point &rhs) const |
| Comparison operator. Returns true if at different positions. More...
|
|
bool | operator< (const Point &rhs) const |
| Comparison operator. Returns true if less-then rhs point. More...
|
|
double & | operator[] (const size_t dimension) |
| Returns the x or y value of the point, given the dimension. More...
|
|
|
double | x |
| The x position.
|
|
double | y |
| The y position.
|
|
unsigned int | id |
| The ID associated with this point.
|
|
unsigned short | vn |
| The vertex number associated with this point.
|
|
The Point class defines a point in the plane.
Points consist of an x and y value. They may also have an ID and vertex number associated with them.
◆ Point()
Avoid::Point::Point |
( |
const double |
xv, |
|
|
const double |
yv |
|
) |
| |
Standard constructor.
- Parameters
-
[in] | xv | The x position of the point. |
[in] | yv | The y position of the point. |
◆ equals()
bool Avoid::Point::equals |
( |
const Point & |
rhs, |
|
|
double |
epsilon = 0.0001 |
|
) |
| const |
Comparison operator. Returns true if at same position, or at effectively the same position for a given value of epsilson.
- Parameters
-
[in] | rhs | The point to compare with this one. |
[in] | epsilon | Value of epsilon to use during comparison. |
- Returns
- The result of the comparison.
- See also
- operator==()
References x, and y.
◆ operator!=()
bool Avoid::Point::operator!= |
( |
const Point & |
rhs | ) |
const |
Comparison operator. Returns true if at different positions.
- Parameters
-
[in] | rhs | The point to compare with this one. |
- Returns
- The result of the comparison.
References x, and y.
◆ operator<()
bool Avoid::Point::operator< |
( |
const Point & |
rhs | ) |
const |
Comparison operator. Returns true if less-then rhs point.
- Note
- This operator is not particularly useful, but is defined to allow std::set<Point>.
- Parameters
-
[in] | rhs | The point to compare with this one. |
- Returns
- The result of the comparison.
References x, and y.
◆ operator==()
bool Avoid::Point::operator== |
( |
const Point & |
rhs | ) |
const |
Comparison operator. Returns true if at same position.
- Parameters
-
[in] | rhs | The point to compare with this one. |
- Returns
- The result of the comparison.
- See also
- equals()
References x, and y.
◆ operator[]()
double & Avoid::Point::operator[] |
( |
const size_t |
dimension | ) |
|
Returns the x or y value of the point, given the dimension.
- Parameters
-
[in] | dimension | The dimension: 0 for x, 1 for y. |
- Returns
- The component of the point in that dimension.
References x, and y.
The documentation for this class was generated from the following files: