RDKit: RDGeom::Point3D Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RDGeom::Point3D Class Reference

`#include <point.h>`

Inheritance diagram for RDGeom::Point3D:

## Public Member Functions
constexpr | Point3D ()
constexpr | Point3D (double xv, double yv, double zv)
constexpr | ~Point3D () override
constexpr | Point3D (const Point3D &other)
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 Point3D & | operator= (const Point3D &other)
constexpr Point3D & | operator+= (const Point3D &other)
constexpr Point3D & | operator-= (const Point3D &other)
constexpr Point3D & | operator*= (double scale)
constexpr Point3D & | operator/= (double scale)
constexpr Point3D | operator- () const
constexpr void | normalize () override
double | length () const override
constexpr double | lengthSq () const override
constexpr 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.
constexpr 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 constexpr | ~Point ()

## Public Attributes
double | x {0.0}
double | y {0.0}
double | z {0.0}

## Detailed Description

Definition at line 53 of file point.h.

## Constructor & Destructor Documentation

## ◆ Point3D() [1/3]

RDGeom::Point3D::Point3D | ( |  | ) |
| inlineconstexpr

Definition at line 59 of file point.h.

Referenced by angleTo(), copy(), crossProduct(), directionVector(), dotProduct(), getPerpendicular(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), Point3D(), and signedAngleTo().

## ◆ Point3D() [2/3]

RDGeom::Point3D::Point3D | ( | double | xv,
|  | double | yv,
|  | double | zv )
| inlineconstexpr

Definition at line 60 of file point.h.

References x, y, and z.

## ◆ ~Point3D()

RDGeom::Point3D::~Point3D | ( |  | ) |
| inlineconstexproverride

Definition at line 62 of file point.h.

## ◆ Point3D() [3/3]

RDGeom::Point3D::Point3D | ( | const Point3D & | other | ) |
| inlineconstexpr

Definition at line 64 of file point.h.

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

## 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 180 of file point.h.

References dotProduct(), lengthSq(), M_PI, and Point3D().

Referenced by signedAngleTo().

## ◆ copy()

Point * RDGeom::Point3D::copy | ( |  | ) | const
| inlinenodiscardconstexproverridevirtual

Implements RDGeom::Point.

Definition at line 67 of file point.h.

References Point3D().

## ◆ crossProduct()

Point3D RDGeom::Point3D::crossProduct | ( | const Point3D & | other | ) | const
| inlineconstexpr

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 228 of file point.h.

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

## ◆ dimension()

unsigned int RDGeom::Point3D::dimension | ( |  | ) | const
| inlineconstexproverridevirtual

Implements RDGeom::Point.

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

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

## ◆ dotProduct()

double RDGeom::Point3D::dotProduct | ( | const Point3D & | other | ) | const
| inlineconstexpr

Definition at line 169 of file point.h.

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

Referenced by angleTo().

## ◆ getPerpendicular()

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

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

Definition at line 239 of file point.h.

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

## ◆ length()

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

Implements RDGeom::Point.

Definition at line 158 of file point.h.

References x, y, and z.

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

## ◆ lengthSq()

double RDGeom::Point3D::lengthSq | ( |  | ) | const
| inlineconstexproverridevirtual

Implements RDGeom::Point.

Definition at line 163 of file point.h.

References x, y, and z.

Referenced by angleTo().

## ◆ normalize()

void RDGeom::Point3D::normalize | ( |  | ) |
| inlineconstexproverridevirtual

Implements RDGeom::Point.

Definition at line 147 of file point.h.

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

Referenced by directionVector().

## ◆ operator*=()

Point3D & RDGeom::Point3D::operator*= | ( | double | scale | ) |
| inlineconstexpr

Definition at line 125 of file point.h.

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

## ◆ operator+=()

Point3D & RDGeom::Point3D::operator+= | ( | const Point3D & | other | ) |
| inlineconstexpr

Definition at line 111 of file point.h.

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

## ◆ operator-()

Point3D RDGeom::Point3D::operator- | ( |  | ) | const
| inlineconstexpr

Definition at line 139 of file point.h.

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

## ◆ operator-=()

Point3D & RDGeom::Point3D::operator-= | ( | const Point3D & | other | ) |
| inlineconstexpr

Definition at line 118 of file point.h.

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

## ◆ operator/=()

Point3D & RDGeom::Point3D::operator/= | ( | double | scale | ) |
| inlineconstexpr

Definition at line 132 of file point.h.

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

## ◆ operator=()

Point3D & RDGeom::Point3D::operator= | ( | const Point3D & | other | ) |
| inlineconstexpr

Definition at line 101 of file point.h.

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

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

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

Implements RDGeom::Point.

Definition at line 73 of file point.h.

References x, y, and z.

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

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

Implements RDGeom::Point.

Definition at line 87 of file point.h.

References x, y, and z.

## ◆ 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 201 of file point.h.

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

## Member Data Documentation

## ◆ x

double RDGeom::Point3D::x {0.0}

Definition at line 55 of file point.h.

Referenced by RDMIF::calculateDescriptors(), crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), operator[](), Point3D(), Point3D(), and signedAngleTo().

## ◆ y

double RDGeom::Point3D::y {0.0}

Definition at line 56 of file point.h.

Referenced by RDMIF::calculateDescriptors(), crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), operator[](), Point3D(), Point3D(), and signedAngleTo().

## ◆ z

double RDGeom::Point3D::z {0.0}

Definition at line 57 of file point.h.

Referenced by RDMIF::calculateDescriptors(), crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), operator[](), Point3D(), and Point3D().

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

- point.h