Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::DPoint Class Reference

Real points. More...

#include <ogdf/basic/geometry.h>

+ Inheritance diagram for ogdf::DPoint:

Public Member Functions

 DPoint ()
 Creates a real point (0,0). More...
 
 DPoint (double x, double y)
 Creates a real point (x,y). More...
 
 DPoint (const DPoint &dp)
 Copy constructor. More...
 
double distance (const DPoint &p) const
 Returns the euclidean distance between p and this point. More...
 
double norm () const
 Returns the norm of the point. More...
 
DPoint & operator*= (double c)
 
DPoint operator+ (const DPoint &p) const
 Addition of real points. More...
 
DPoint & operator+= (const DPoint &p)
 
DPoint operator- (const DPoint &p) const
 Subtraction of real points. More...
 
DPoint & operator-= (const DPoint &p)
 
DPoint & operator/= (double c)
 
bool operator== (const DPoint &dp) const
 Relaxed equality operator. More...
 
- Public Member Functions inherited from ogdf::GenericPoint< double >
 GenericPoint ()
 Creates a generic point. More...
 
 GenericPoint (double x, double y)
 Creates a generic point (x,y). More...
 
 GenericPoint (const GenericPoint &p)
 Copy constructor. More...
 
double angle (GenericPoint q, GenericPoint r) const
 Compute angle (in radians) between vectors. More...
 
double angleDegrees (GenericPoint q, GenericPoint r) const
 Compute angle (in degrees) between vectors. More...
 
bool operator!= (const GenericPoint &p) const
 Inequality operator. More...
 
bool operator< (const GenericPoint &p)
 
GenericPoint & operator= (const GenericPoint &p)
 Assignment operator. More...
 
bool operator== (const GenericPoint &p) const
 Equality operator. More...
 
bool operator> (const GenericPoint &p)
 

Friends

DPoint operator* (double c, const DPoint &p)
 

Additional Inherited Members

- Public Types inherited from ogdf::GenericPoint< double >
using numberType = double
 The type for coordinates of the point. More...
 
- Public Attributes inherited from ogdf::GenericPoint< double >
double m_x
 The x-coordinate. More...
 
double m_y
 The y-coordinate. More...
 

Detailed Description

Real points.

This class represent a two-dimensional point with real coordinates.

Definition at line 219 of file geometry.h.

Constructor & Destructor Documentation

◆ DPoint() [1/3]

ogdf::DPoint::DPoint ( )
inline

Creates a real point (0,0).

Definition at line 223 of file geometry.h.

◆ DPoint() [2/3]

ogdf::DPoint::DPoint ( double  x,
double  y 
)
inline

Creates a real point (x,y).

Definition at line 226 of file geometry.h.

◆ DPoint() [3/3]

ogdf::DPoint::DPoint ( const DPoint &  dp)
inline

Copy constructor.

Definition at line 229 of file geometry.h.

Member Function Documentation

◆ distance()

double ogdf::DPoint::distance ( const DPoint &  p) const

Returns the euclidean distance between p and this point.

◆ norm()

double ogdf::DPoint::norm ( ) const
inline

Returns the norm of the point.

Definition at line 237 of file geometry.h.

◆ operator*=()

DPoint& ogdf::DPoint::operator*= ( double  c)
inline

Definition at line 259 of file geometry.h.

◆ operator+()

DPoint ogdf::DPoint::operator+ ( const DPoint &  p) const

Addition of real points.

◆ operator+=()

DPoint& ogdf::DPoint::operator+= ( const DPoint &  p)
inline

Definition at line 247 of file geometry.h.

◆ operator-()

DPoint ogdf::DPoint::operator- ( const DPoint &  p) const

Subtraction of real points.

◆ operator-=()

DPoint& ogdf::DPoint::operator-= ( const DPoint &  p)
inline

Definition at line 253 of file geometry.h.

◆ operator/=()

DPoint& ogdf::DPoint::operator/= ( double  c)
inline

Definition at line 265 of file geometry.h.

◆ operator==()

bool ogdf::DPoint::operator== ( const DPoint &  dp) const
inline

Relaxed equality operator.

Definition at line 232 of file geometry.h.

Friends And Related Function Documentation

◆ operator*

DPoint operator* ( double  c,
const DPoint &  p 
)
friend

Definition at line 271 of file geometry.h.


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