RDKit
Open-source cheminformatics and machine learning.
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 ()
 
 Point3D (const Point3D &other)
 
virtual Pointcopy () const
 
unsigned int dimension () const
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
Point3Doperator= (const Point3D &other)
 
Point3Doperator+= (const Point3D &other)
 
Point3Doperator-= (const Point3D &other)
 
Point3Doperator*= (double scale)
 
Point3Doperator/= (double scale)
 
Point3D operator- () const
 
void normalize ()
 
double length () const
 
double lengthSq () const
 
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. More...
 
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. More...
 
Point3D directionVector (const Point3D &other) const
 Returns a normalized direction vector from this point to another. More...
 
Point3D crossProduct (const Point3D &other) const
 Cross product of this point with the another point. More...
 
Point3D getPerpendicular () const
 Get a unit perpendicular from this point (treating it as a vector): More...
 
- Public Member Functions inherited from RDGeom::Point
virtual ~Point ()
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Definition at line 45 of file point.h.

Constructor & Destructor Documentation

RDGeom::Point3D::Point3D ( )
inline

Definition at line 49 of file point.h.

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

Definition at line 50 of file point.h.

RDGeom::Point3D::~Point3D ( )
inline

Definition at line 52 of file point.h.

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

Definition at line 54 of file point.h.

Member Function Documentation

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

References dotProduct(), and normalize().

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

Implements RDGeom::Point.

Definition at line 57 of file point.h.

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

References x, y, and z.

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

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

Implements RDGeom::Point.

Definition at line 59 of file point.h.

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

Returns a normalized direction vector from this point to another.

Definition at line 186 of file point.h.

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

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

Definition at line 144 of file point.h.

References x, y, and z.

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

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

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

Definition at line 211 of file point.h.

References RDGeom::computeDihedralAngle(), RDGeom::computeSignedDihedralAngle(), length(), POSTCONDITION, x, y, and z.

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

Implements RDGeom::Point.

Definition at line 133 of file point.h.

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

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

Implements RDGeom::Point.

Definition at line 138 of file point.h.

void RDGeom::Point3D::normalize ( )
inlinevirtual

Implements RDGeom::Point.

Definition at line 126 of file point.h.

References RDGeom::Point::length().

Referenced by angleTo(), and directionVector().

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

Definition at line 104 of file point.h.

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

Definition at line 90 of file point.h.

References x, y, and z.

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

Definition at line 118 of file point.h.

References x, y, and z.

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

Definition at line 97 of file point.h.

References x, y, and z.

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

Definition at line 111 of file point.h.

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

Definition at line 83 of file point.h.

References x, y, and z.

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

Implements RDGeom::Point.

Definition at line 61 of file point.h.

References PRECONDITION.

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

Implements RDGeom::Point.

Definition at line 72 of file point.h.

References PRECONDITION.

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

References M_PI, x, and y.

Member Data Documentation

double RDGeom::Point3D::z

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