RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDGeom::Point3D Class Reference

#include <point.h>

Inheritance diagram for RDGeom::Point3D:
RDGeom::Point

Public Member Functions

 Point3D ()
 
 Point3D (double xv, double yv, double zv)
 
 ~Point3D () override=default
 
 Point3D (const Point3D &other)
 
Pointcopy () const override
 
unsigned int dimension () const override
 
double operator[] (unsigned int i) const override
 
double & operator[] (unsigned int i) override
 
Point3Doperator= (const Point3D &other)
 
Point3Doperator+= (const Point3D &other)
 
Point3Doperator-= (const Point3D &other)
 
Point3Doperator*= (double scale)
 
Point3Doperator/= (double scale)
 
Point3D operator- () const
 
void normalize () override
 
double length () const override
 
double lengthSq () const override
 
double dotProduct (const Point3D &other) const
 
double angleTo (const Point3D &other) const
 determines the angle between a vector to this point from the origin and a vector to the other point.
 
double signedAngleTo (const Point3D &other) const
 determines the signed angle between a vector to this point from the origin and a vector to the other point.
 
Point3D directionVector (const Point3D &other) const
 Returns a normalized direction vector from this point to another.
 
Point3D crossProduct (const Point3D &other) const
 Cross product of this point with the another point.
 
Point3D getPerpendicular () const
 Get a unit perpendicular from this point (treating it as a vector):
 
- Public Member Functions inherited from RDGeom::Point
virtual ~Point ()
 

Public Attributes

double x {0.0}
 
double y {0.0}
 
double z {0.0}
 

Detailed Description

Definition at line 54 of file point.h.

Constructor & Destructor Documentation

◆ Point3D() [1/3]

RDGeom::Point3D::Point3D ( )
inline

Definition at line 60 of file point.h.

◆ Point3D() [2/3]

RDGeom::Point3D::Point3D ( double xv,
double yv,
double zv )
inline

Definition at line 61 of file point.h.

◆ ~Point3D()

RDGeom::Point3D::~Point3D ( )
overridedefault

◆ Point3D() [3/3]

RDGeom::Point3D::Point3D ( const Point3D & other)
inline

Definition at line 65 of file point.h.

Member Function Documentation

◆ angleTo()

double RDGeom::Point3D::angleTo ( const Point3D & other) const
inline

determines the angle between a vector to this point from the origin and a vector to the other point.

The angle is unsigned: the results of this call will always be between 0 and M_PI

Definition at line 169 of file point.h.

References lengthSq(), and M_PI.

◆ copy()

Point * RDGeom::Point3D::copy ( ) const
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 68 of file point.h.

◆ crossProduct()

Point3D RDGeom::Point3D::crossProduct ( const Point3D & other) const
inline

Cross product of this point with the another point.

The order is important here The result is "this" cross with "other" not (other x this)

Definition at line 217 of file point.h.

References x, y, and z.

Referenced by DistGeom::ChiralViolationContrib::calcChiralVolume(), and DistGeom::ChiralViolationContrib::calcChiralVolume().

◆ dimension()

unsigned int RDGeom::Point3D::dimension ( ) const
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 70 of file point.h.

◆ directionVector()

Point3D RDGeom::Point3D::directionVector ( const Point3D & other) const
inline

Returns a normalized direction vector from this point to another.

Definition at line 203 of file point.h.

References normalize(), x, y, and z.

◆ dotProduct()

double RDGeom::Point3D::dotProduct ( const Point3D & other) const
inline

◆ getPerpendicular()

Point3D RDGeom::Point3D::getPerpendicular ( ) const
inline

Get a unit perpendicular from this point (treating it as a vector):

Definition at line 228 of file point.h.

References length(), POSTCONDITION, x, y, and z.

◆ length()

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

Implements RDGeom::Point.

Definition at line 147 of file point.h.

Referenced by RDGeom::compute14Dist3D(), and getPerpendicular().

◆ lengthSq()

double RDGeom::Point3D::lengthSq ( ) const
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 152 of file point.h.

Referenced by angleTo().

◆ normalize()

void RDGeom::Point3D::normalize ( )
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 140 of file point.h.

Referenced by directionVector().

◆ operator*=()

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

Definition at line 118 of file point.h.

◆ operator+=()

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

Definition at line 104 of file point.h.

References x, y, and z.

◆ operator-()

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

Definition at line 132 of file point.h.

References x, y, and z.

◆ operator-=()

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

Definition at line 111 of file point.h.

References x, y, and z.

◆ operator/=()

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

Definition at line 125 of file point.h.

◆ operator=()

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

Definition at line 94 of file point.h.

References x, y, and z.

◆ operator[]() [1/2]

double RDGeom::Point3D::operator[] ( unsigned int i) const
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 72 of file point.h.

References PRECONDITION.

◆ operator[]() [2/2]

double & RDGeom::Point3D::operator[] ( unsigned int i)
inlineoverridevirtual

Implements RDGeom::Point.

Definition at line 83 of file point.h.

References PRECONDITION.

◆ signedAngleTo()

double RDGeom::Point3D::signedAngleTo ( const Point3D & other) const
inline

determines the signed angle between a vector to this point from the origin and a vector to the other point.

The results of this call will be between 0 and M_2_PI

Definition at line 190 of file point.h.

References M_PI, x, and y.

Member Data Documentation

◆ x

double RDGeom::Point3D::x {0.0}

◆ y

double RDGeom::Point3D::y {0.0}

◆ z

double RDGeom::Point3D::z {0.0}

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