RDKit: RDGeom::Point2D Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
RDGeom::Point2D Class Reference

`#include <point.h>`

Inheritance diagram for RDGeom::Point2D:

## Public Member Functions
| Point2D ()
| Point2D (double xv, double yv)
| ~Point2D ()
| Point2D (const Point2D &other)
virtual Point * | copy () const
unsigned int | dimension () const
double | operator[] (unsigned int i) const
double & | operator[] (unsigned int i)
Point2D & | operator= (const Point2D &other)
Point2D & | operator+= (const Point2D &other)
Point2D & | operator-= (const Point2D &other)
Point2D & | operator*= (double scale)
Point2D & | operator/= (double scale)
Point2D | operator- () const
void | normalize ()
void | rotate90 ()
double | length () const
double | lengthSq () const
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 | ~Point ()

## Public Attributes
double | x
double | y

## Detailed Description

Definition at line 254 of file point.h.

## Constructor & Destructor Documentation

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

Definition at line 258 of file point.h.

Referenced by copy().

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

Definition at line 259 of file point.h.

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

Definition at line 261 of file point.h.

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

Definition at line 263 of file point.h.

## Member Function Documentation

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

Definition at line 352 of file point.h.

References dotProduct(), and normalize().

Referenced by RDDepict::computeAngle(), and signedAngleTo().

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

Implements RDGeom::Point.

Definition at line 265 of file point.h.

References Point2D().

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

Implements RDGeom::Point.

Definition at line 267 of file point.h.

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

Definition at line 373 of file point.h.

References normalize(), x, and y.

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

Definition at line 347 of file point.h.

References x, and y.

Referenced by angleTo(), and RDKit::Drawing::DrawMol().

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

Implements RDGeom::Point.

Definition at line 336 of file point.h.

References y.

Referenced by normalize().

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

Implements RDGeom::Point.

Definition at line 342 of file point.h.

References y.

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

Implements RDGeom::Point.

Definition at line 324 of file point.h.

References length().

Referenced by angleTo(), RDDepict::computeNormal(), directionVector(), and RDKit::Drawing::DrawMol().

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

Definition at line 305 of file point.h.

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

Definition at line 293 of file point.h.

References x, and y.

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

Definition at line 317 of file point.h.

References x, and y.

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

Definition at line 299 of file point.h.

References x, and y.

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

Definition at line 311 of file point.h.

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

Definition at line 287 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 269 of file point.h.

References PRECONDITION, x, and y.

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

Implements RDGeom::Point.

Definition at line 278 of file point.h.

References PRECONDITION, x, and y.

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

Definition at line 330 of file point.h.

References x, and y.

Referenced by RDKit::Drawing::DrawMol().

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

Definition at line 367 of file point.h.

References angleTo(), M_PI, x, and y.

## Member Data Documentation

double RDGeom::Point2D::x

Definition at line 256 of file point.h.

Referenced by RDDepict::computeNormal(), directionVector(), dotProduct(), RDKit::MolDraw2Dwx::drawChar(), RDKit::MolDraw2Dwx::drawLine(), RDKit::Drawing::DrawMol(), RDKit::MolDraw2Dwx::drawPolygon(), RDKit::Drawing::detail::getAtomSymbolAndOrientation(), operator+=(), operator-(), operator-=(), operator=(), operator[](), rotate90(), RDDepict::rotationDir(), and signedAngleTo().

double RDGeom::Point2D::y

Definition at line 256 of file point.h.

Referenced by RDDepict::computeNormal(), directionVector(), dotProduct(), RDKit::MolDraw2Dwx::drawChar(), RDKit::MolDraw2Dwx::drawLine(), RDKit::Drawing::DrawMol(), RDKit::MolDraw2Dwx::drawPolygon(), RDKit::Drawing::detail::getAtomSymbolAndOrientation(), length(), lengthSq(), operator+=(), operator-(), operator-=(), operator=(), operator[](), rotate90(), RDDepict::rotationDir(), and signedAngleTo().

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

- point.h