|
ActiveLib
|
#include <Point.h>


Public Types | |
| using | Unique = std::unique_ptr<Point> |
| Unique pointer. | |
| using | Shared = std::shared_ptr<Point> |
| Shared pointer. | |
| using | Option = std::optional<Point> |
| Optional. | |
Public Member Functions | |
| Point () | |
| Point (const double &x, const double &y, const double &z=0.0) | |
| Point (const Point &source2D, double z) | |
| virtual | ~Point ()=default |
| virtual Point * | clonePtr () const |
| virtual bool | operator== (const Point &ref) const |
| virtual bool | operator!= (const Point &ref) const |
| virtual bool | operator< (const Point &ref) const |
| Point & | operator= (const Point &source) |
| virtual Point | operator+ (const Point &offset) const |
| virtual Point & | operator+= (const Point &offset) |
| virtual Point | operator- (const Point &offset) const |
| virtual Point & | operator-= (const Point &offset) |
| virtual Point | operator* (const double &mult) const |
| virtual Point | operator* (const Matrix3x3 &matrix) const |
| virtual Point | operator* (const Matrix4x4 &matrix) const |
| virtual Point & | operator*= (const double &mult) |
| virtual Point & | operator*= (const Matrix3x3 &matrix) |
| virtual Point & | operator*= (const Matrix4x4 &matrix) |
| virtual Point | operator/ (const double &mult) const |
| virtual Point & | operator/= (const double &mult) |
| virtual bool | isEqual2D (const Point &ref, double prec=math::eps) const |
| virtual bool | isEqual3D (const Point &ref, double prec=math::eps) const |
| virtual double | lengthFrom2D (const Point &ref) const |
| virtual double | lengthFrom3D (const Point &ref) const |
| Point | rounded2D (double prec=math::eps) const |
| Point | rounded3D (double prec=math::eps) const |
| double | azimuthAngleTo (const Point &ref) const |
| double | altitudeAngleTo (const Point &ref) const |
| Point & | movePolar (double len, double angle) |
| Point & | movePolar (double len, double azim, double alt) |
Public Member Functions inherited from active::utility::Cloner | |
| virtual | ~Cloner ()=default |
Public Attributes | |
| double | x |
| X coordinate. | |
| double | y |
| Y coordinate. | |
| double | z |
| Z coordinate. | |
A class to represent a point in 3-dimensional space, i.e. with x, y, z coordinates
Note that this class serves for both 2D and 3D contexts (rather than having a separate class for each). Functionality that is specific to either context is clearly labelled, e.g. 'isEqual2D' vs 'isEqual3D'.
| Point::Point | ( | ) |
Constructor

| Point::Point | ( | const double & | x, |
| const double & | y, | ||
| const double & | z = 0.0 ) |
Constructor
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| Point::Point | ( | const Point & | source2D, |
| double | z ) |
Constructor
| source2D | A 2D point, i.e. only the x/y coordinates are relevant |
| z | z coordinate |
|
virtualdefault |
Destructor
| double Point::altitudeAngleTo | ( | const Point & | ref | ) | const |
Calculates the altitude angle from this to the specified point
| ref | A point to calculate the angle to |


| double Point::azimuthAngleTo | ( | const Point & | ref | ) | const |
Calculates the azimuth angle from this to the specified point
| ref | A point to calculate the angle to |

|
inlinevirtual |
Clone method
Implements active::utility::Cloner.
Reimplemented in active::geometry::XPoint, and active::geometry::PolyPoint.

Determine if two points are equal in 2D
| ref | The point to compare with this |
| prec | Precision |


Determine if two points are equal
| ref | The point to compare with this |
| prec | Precision |


|
virtual |
Calculates the 2D distance from this to a specified point
| ref | The point to compare with this |
Reimplemented in active::geometry::PolyPoint.

|
virtual |
Calculates the distant from a specified point to this in 3D
| ref | A point to calculate the distance from |

| Point & Point::movePolar | ( | double | len, |
| double | angle ) |
Offset a point in the x/y plane by the specified distance and angle
| len | The distance to move the point |
| angle | The angle on which the point will move |

| Point & Point::movePolar | ( | double | len, |
| double | azim, | ||
| double | alt ) |
Offset a point in the x/y/z plane by the specified distance and azimuth/altitude angle
| len | The distance to move the point |
| azim | The azimuth angle on which the point will move |
| alt | The altitude angle on which the point will move |
|
inlinevirtual |
Inequality operator
| ref | The point to compare with this |

|
virtual |
Multiplication operator
| mult | The factor to multiply the point by |

Multiplication operator
| matrix | The matrix to multiply the point by |
Multiplication operator
| matrix | The matrix to multiply the point by |
|
virtual |
Multiplication and assignment operator
| mult | The factor to multiply the point by |
Multiplication and assignment operator
| matrix | The matrix to multiply the point by |
Multiplication and assignment operator
| matrix | The matrix to multiply the point by |
Addition operator
| offset | The point to add |

Addition and assignment operator
| offset | The point to add |
Substraction operator
| offset | The point to substract |

Substraction and assignment operator
| offset | The point to substract |
|
virtual |
Division operator
| mult | The factor to divide the point by |

|
virtual |
Division and assignment operator
| mult | The factor to divide the point by |
|
virtual |
Less-than operator
| ref | The point to compare with this |

Assignment operator
| source | The point to assign |

|
inlinevirtual |
Equality operator
| ref | The point to compare with this |

Return the point with coordinates rounded to the specified level of precision

Return the point with coordinates rounded to the specified level of precision
