Fade2.5D Documentation pages v1.93
Delaunay Features
Point2.h File Reference
#include "common.h"
#include "Vector2.h"

Go to the source code of this file.

Classes

struct  GEOM_FADE25D::Func_ltPointXYZ
 Functor to sort points lexicographically. More...
 
class  GEOM_FADE25D::Point2
 Point. More...
 

Functions

Point2 GEOM_FADE25D::center (const Point2 &p0, const Point2 &p1)
 Compute the midpoint of p0 and p1. More...
 
Point2 GEOM_FADE25D::centerWithShift (const Point2 &p0, const Point2 &p1)
 Compute the midpoint of p0 and p1 and adapt it. More...
 
std::ostream & GEOM_FADE25D::operator<< (std::ostream &stream, const Point2 &pnt)
 Print to stream.
 
std::istream & GEOM_FADE25D::operator>> (std::istream &stream, Point2 &pnt)
 Stream-to-Point.
 
double GEOM_FADE25D::sqDistance25D (const double x0, const double y0, const double z0, const Point2 &p1)
 Get the squared distance between two points in 2D. More...
 
double GEOM_FADE25D::sqDistance25D (const Point2 &p0, const Point2 &p1)
 Get the squared distance between two points. More...
 
double GEOM_FADE25D::sqDistance2D (const double x0, const double y0, const Point2 &p1)
 Get the squared distance between two points in 2D. More...
 
double GEOM_FADE25D::sqDistance2D (const Point2 &p0, const Point2 &p1)
 Get the squared distance between two points in 2D. More...
 

Function Documentation

◆ center()

Point2 GEOM_FADE25D::center ( const Point2 p0,
const Point2 p1 
)
inline
Note
: The exact midpoint of p0 and p1 may not exist in floating point numbers. Thus the returned point may not be collinear with p0 and p1.

◆ centerWithShift()

Point2 GEOM_FADE25D::centerWithShift ( const Point2 p0,
const Point2 p1 
)

Experimental new function that may change in the future. Thought for specific applications.

This function works like center() but additionally it adapts the midpoint to the segment (p0,p1) such that it is 'as collinear as possible' with p0 and p1 in the x/y plane. Bounds for the shift are 0.01 and 1 % of the range in x- and y-direction.

◆ sqDistance25D() [1/2]

double GEOM_FADE25D::sqDistance25D ( const double  x0,
const double  y0,
const double  z0,
const Point2 p1 
)
inline
Note
In contrast to sqDistance2D this method uses also the z-coordinate of the points

◆ sqDistance25D() [2/2]

double GEOM_FADE25D::sqDistance25D ( const Point2 p0,
const Point2 p1 
)
inline
Note
In contrast to sqDistance2D this method uses also the z-coordinate of the points

◆ sqDistance2D() [1/2]

double GEOM_FADE25D::sqDistance2D ( const double  x0,
const double  y0,
const Point2 p1 
)
inline
Note
This method does not use the z-coordinate

◆ sqDistance2D() [2/2]

double GEOM_FADE25D::sqDistance2D ( const Point2 p0,
const Point2 p1 
)
inline
Note
This method does not use the z-coordinate