Loading...
Searching...
No Matches
Point2D Class Reference

`#include <point.h>`

Inheritance diagram for Point2D:

## Public Member Functions

constexpr | Point2D ()
constexpr | Point2D (double xv, double yv)
constexpr | Point2D (const Point2D &other)
constexpr | Point2D (const Point3D &p3d)
| construct from a Point3D (ignoring the z coordinate)
constexpr | ~Point2D () override
constexpr Point * | copy () const override
constexpr unsigned int | dimension () const override
constexpr double | operator[] (unsigned int i) const override
constexpr double & | operator[] (unsigned int i) override
constexpr Point2D & | operator= (const Point2D &other)
constexpr Point2D & | operator+= (const Point2D &other)
constexpr Point2D & | operator-= (const Point2D &other)
constexpr Point2D & | operator*= (double scale)
constexpr Point2D & | operator/= (double scale)
constexpr Point2D | operator- () const
void | normalize () override
constexpr void | rotate90 ()
double | length () const override
constexpr double | lengthSq () const override
constexpr double | dotProduct (const Point2D &other) const
double | angleTo (const Point2D &other) const
double | signedAngleTo (const Point2D &other) const
Point2D | directionVector (const Point2D &other) const
Public Member Functions inherited from RDGeom::Point
virtual constexpr | ~Point ()

## Public Attributes

double | x {0.0}
double | y {0.0}

## Detailed Description

Definition at line 284 of file point.h.

## Constructor & Destructor Documentation

## Point2D() [1/4]

RDGeom::Point2D::Point2D | ( |  | ) |

inline constexpr

Definition at line 289 of file point.h.

## Point2D() [2/4]

RDGeom::Point2D::Point2D | ( | double | xv,
|  | double | yv )

inline constexpr

Definition at line 290 of file point.h.

## Point2D() [3/4]

RDGeom::Point2D::Point2D | ( | const Point2D & | other | ) |

inline constexpr

Definition at line 293 of file point.h.

## Point2D() [4/4]

RDGeom::Point2D::Point2D | ( | const Point3D & | p3d | ) |

inline constexpr

construct from a Point3D (ignoring the z coordinate)

Definition at line 296 of file point.h.

## ~Point2D()

RDGeom::Point2D::~Point2D | ( |  | ) |

inline constexpr override

Definition at line 291 of file point.h.

## Member Function Documentation

## angleTo()

double RDGeom::Point2D::angleTo | ( | const Point2D & | other | ) | const

inline

Definition at line 397 of file point.h.

## copy()

Point * RDGeom::Point2D::copy | ( |  | ) | const

inline nodiscard constexpr override virtual

Implements RDGeom::Point.

Definition at line 298 of file point.h.

## dimension()

unsigned int RDGeom::Point2D::dimension | ( |  | ) | const

inline constexpr override virtual

Implements RDGeom::Point.

Definition at line 302 of file point.h.

## directionVector()

Point2D RDGeom::Point2D::directionVector | ( | const Point2D & | other | ) | const

inline

Definition at line 420 of file point.h.

## dotProduct()

double RDGeom::Point2D::dotProduct | ( | const Point2D & | other | ) | const

inline constexpr

Definition at line 392 of file point.h.

## length()

double RDGeom::Point2D::length | ( |  | ) | const

inline override virtual

Implements RDGeom::Point.

Definition at line 381 of file point.h.

## lengthSq()

double RDGeom::Point2D::lengthSq | ( |  | ) | const

inline constexpr override virtual

Implements RDGeom::Point.

Definition at line 387 of file point.h.

## normalize()

void RDGeom::Point2D::normalize | ( |  | ) |

inline override virtual

Implements RDGeom::Point.

Definition at line 365 of file point.h.

## operator*=()

Point2D & RDGeom::Point2D::operator*= | ( | double | scale | ) |

inline constexpr

Definition at line 346 of file point.h.

## operator+=()

Point2D & RDGeom::Point2D::operator+= | ( | const Point2D & | other | ) |

inline constexpr

Definition at line 334 of file point.h.

## operator-()

Point2D RDGeom::Point2D::operator- | ( |  | ) | const

inline constexpr

Definition at line 358 of file point.h.

## operator-=()

Point2D & RDGeom::Point2D::operator-= | ( | const Point2D & | other | ) |

inline constexpr

Definition at line 340 of file point.h.

## operator/=()

Point2D & RDGeom::Point2D::operator/= | ( | double | scale | ) |

inline constexpr

Definition at line 352 of file point.h.

## operator=()

Point2D & RDGeom::Point2D::operator= | ( | const Point2D & | other | ) |

inline constexpr

Definition at line 328 of file point.h.

## operator[]() [1/2]

double RDGeom::Point2D::operator[] | ( | unsigned int | i | ) | const

inline constexpr override virtual

Implements RDGeom::Point.

Definition at line 304 of file point.h.

## operator[]() [2/2]

double & RDGeom::Point2D::operator[] | ( | unsigned int | i | ) |

inline constexpr override virtual

Implements RDGeom::Point.

Definition at line 316 of file point.h.

## rotate90()

void RDGeom::Point2D::rotate90 | ( |  | ) |

inline constexpr

Definition at line 375 of file point.h.

## signedAngleTo()

double RDGeom::Point2D::signedAngleTo | ( | const Point2D & | other | ) | const

inline

Definition at line 412 of file point.h.

## Member Data Documentation

## x

double RDGeom::Point2D::x {0.0}

Definition at line 286 of file point.h.

Referenced by RDKit::MolDraw2D_detail::StringRect::calcCorners(), RDKit::MolDraw2D_detail::StringRect::doesItIntersect(), and RDKit::MolDraw2D_detail::StringRect::isPointInside().

## y

double RDGeom::Point2D::y {0.0}

Definition at line 287 of file point.h.

Referenced by RDKit::MolDraw2D_detail::StringRect::calcCentre(), RDKit::MolDraw2D_detail::StringRect::calcCorners(), RDKit::MolDraw2D_detail::StringRect::doesItIntersect(), and RDKit::MolDraw2D_detail::StringRect::isPointInside().

The documentation for this class was generated from the following file:

- point.h