26 inline double x()
const {
34 inline double y()
const {
42 inline double z()
const {
78 return (v - (*
this)).angle();
93 return this->
_x == coord.
_x && this->
_y == coord.
_y && this->
_z == coord.
_z;
97 return this->
_x != coord.
_x || this->
_y != coord.
_y || this->
_z != coord.
_z;
105 return (*
this - c).magnitude();
184 return std::atan2(
_y,
_x);
208 return v1.
x() * v2.
x() + v1.
y() * v2.
y() + v1.
z() * v2.
z();
218 double x0 =
_x * angleVector.
x() -
_y * angleVector.
y();
219 double y0 =
_x * angleVector.
y() +
_y * angleVector.
x();
241 return point + (*
this - point).
rotate(angleVector);
286 return scale_center + ((*
this - scale_center) * scale_factor);
293 return (other - *
this) / 2. + *
this;
316 return direction.
norm() * d + *
this;
323 return (to - *
this).
norm() * d + *
this;
345 auto ret= axis1 + dir*
dot(*
this- axis1, dir)/a;
346 return ret + ret - *
this;
351 os <<
"Coordinate(x=" << coordinate.
_x <<
" y=" << coordinate.
_y <<
" z=" << coordinate.
_z <<
")";
Coordinate mirror(const Coordinate &axis1, const Coordinate &axis2) const
mirror a coordinate
Coordinate moveTo(const Coordinate &to, double d) const
Coordinate mid(const Coordinate &other) const
bool operator()(const Coordinate &left, const Coordinate &right) const
Coordinate scale(const Coordinate &scale_center, const Coordinate &scale_factor) const
bool operator!=(const Coordinate &coord) const
double x() const
Returns x of Coordinate.
Coordinate flipXY() const
flips the x and y of Coordinate
double angleTo(const Coordinate &v) const
Returns angle To the coordinate.
const Coordinate _distanceFrom
Coordinate rotate(const geo::Coordinate &point, const double &angle) const
rotate around a point with a angle
double y() const
Returns y of Coordinate.
CoordinateDistanceSort(const Coordinate &distanceFrom)
Coordinate scale(const double &scale_factor) const
Coordinate(double x, double y)
Coordinate operator/(double s) const
double dot(const Coordinate &v1, const Coordinate &v2) const
double z() const
Returns z of Coordinate.
Coordinate operator+(const Coordinate &coord) const
Coordinate transform2d(double xx, double yx, double xy, double yy, double x0, double y0)
Coordinate rotate(const Coordinate &angleVector) const
rotate around (0.,0.) with a given angle vector
friend std::ostream & operator<<(std::ostream &os, const Coordinate &coordinate)
Coordinate(double x, double y, double z)
Coordinate move(const Coordinate &direction, double d) const
sort a Collection in order of distance to a specific coordinate
Coordinate rotate(const geo::Coordinate &point, const Coordinate &angleVector) const
rotate around a point with a angle vector
Coordinate rotateByArcLength(const geo::Coordinate &point, double const length) const
rotate around a point where the rotation described length is known Example
Coordinate norm(const double f) const
Coordinate rotate(const double &angle) const
rotate around (0.,0.) with a given angle
Coordinate(Coordinate &&c) noexcept
Coordinate operator*(const Coordinate &coord) const
double dot(const Coordinate &coord) const
Coordinate & operator=(const Coordinate &coord)
double distanceTo(const geo::Coordinate &c) const
Coordinate(const Coordinate &c)
Coordinate scale(const Coordinate &scale_factor) const
bool operator==(const Coordinate &coord) const
checks for the equality of Coordinate
Coordinate operator-() const
operator -
double angleBetween(const Coordinate &v1, const Coordinate &v2) const