RDKit
Open-source cheminformatics and machine learning.
RDGeom::Point2D Class Reference

#include <point.h>

Inheritance diagram for RDGeom::Point2D:
RDGeom::Point

Public Member Functions

 Point2D ()
 
 Point2D (double xv, double yv)
 
 ~Point2D ()
 
 Point2D (const Point2D &other)
 
virtual Pointcopy () const
 
unsigned int dimension () const
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
Point2Doperator= (const Point2D &other)
 
Point2Doperator+= (const Point2D &other)
 
Point2Doperator-= (const Point2D &other)
 
Point2Doperator*= (double scale)
 
Point2Doperator/= (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 263 of file point.h.

Constructor & Destructor Documentation

RDGeom::Point2D::Point2D ( )
inline

Definition at line 268 of file point.h.

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

Definition at line 269 of file point.h.

RDGeom::Point2D::~Point2D ( )
inline

Definition at line 271 of file point.h.

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

Definition at line 273 of file point.h.

Member Function Documentation

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

Definition at line 366 of file point.h.

References dotProduct(), and normalize().

Referenced by RDDepict::computeAngle().

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

Implements RDGeom::Point.

Definition at line 276 of file point.h.

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

Implements RDGeom::Point.

Definition at line 280 of file point.h.

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

Definition at line 385 of file point.h.

References normalize(), x, and y.

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

Definition at line 361 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 350 of file point.h.

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

Implements RDGeom::Point.

Definition at line 356 of file point.h.

void RDGeom::Point2D::normalize ( )
inlinevirtual

Implements RDGeom::Point.

Definition at line 338 of file point.h.

References RDGeom::Point::length().

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

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

Definition at line 319 of file point.h.

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

Definition at line 307 of file point.h.

References x, and y.

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

Definition at line 331 of file point.h.

References x, and y.

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

Definition at line 313 of file point.h.

References x, and y.

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

Definition at line 325 of file point.h.

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

Definition at line 301 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 282 of file point.h.

References PRECONDITION.

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

Implements RDGeom::Point.

Definition at line 291 of file point.h.

References PRECONDITION.

void RDGeom::Point2D::rotate90 ( )
inline

Definition at line 344 of file point.h.

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

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

Definition at line 379 of file point.h.

References M_PI, x, and y.

Member Data Documentation


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