RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
Point2D Class Reference

#include <point.h>

Inheritance diagram for Point2D:
RDGeom::Point

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 Point2Doperator= (const Point2D &other)
 
constexpr Point2Doperator+= (const Point2D &other)
 
constexpr Point2Doperator-= (const Point2D &other)
 
constexpr Point2Doperator*= (double scale)
 
constexpr Point2Doperator/= (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 ( )
inlineconstexpr

Definition at line 289 of file point.h.

◆ Point2D() [2/4]

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

Definition at line 290 of file point.h.

◆ Point2D() [3/4]

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

Definition at line 293 of file point.h.

◆ Point2D() [4/4]

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

construct from a Point3D (ignoring the z coordinate)

Definition at line 296 of file point.h.

◆ ~Point2D()

RDGeom::Point2D::~Point2D ( )
inlineconstexproverride

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
inlinenodiscardconstexproverridevirtual

Implements RDGeom::Point.

Definition at line 298 of file point.h.

◆ dimension()

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

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
inlineconstexpr

Definition at line 392 of file point.h.

◆ length()

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

Implements RDGeom::Point.

Definition at line 381 of file point.h.

◆ lengthSq()

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

Implements RDGeom::Point.

Definition at line 387 of file point.h.

◆ normalize()

void RDGeom::Point2D::normalize ( )
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 365 of file point.h.

◆ operator*=()

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

Definition at line 346 of file point.h.

◆ operator+=()

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

Definition at line 334 of file point.h.

◆ operator-()

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

Definition at line 358 of file point.h.

◆ operator-=()

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

Definition at line 340 of file point.h.

◆ operator/=()

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

Definition at line 352 of file point.h.

◆ operator=()

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

Definition at line 328 of file point.h.

◆ operator[]() [1/2]

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

Implements RDGeom::Point.

Definition at line 304 of file point.h.

◆ operator[]() [2/2]

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

Implements RDGeom::Point.

Definition at line 316 of file point.h.

◆ rotate90()

void RDGeom::Point2D::rotate90 ( )
inlineconstexpr

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

◆ y


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