Fade2.5D Documentation pages v2.16.3
Delaunay Features
Point2.h File Reference
#include "common.h"
#include "Vector2.h"
#include <cstring>

Go to the source code of this file.

Classes

struct  GEOM_FADE25D::Func_ltPointXYZ
 Functor to sort points lexicographically. More...
 
struct  GEOM_FADE25D::Func_samePointXYZ
 Functor to compare two points in 3 dimensions. More...
 
class  GEOM_FADE25D::Point2
 Point. More...
 
struct  GEOM_FADE25D::VtxColor
 

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

Compute the midpoint of p0 and p1.

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 
)

Compute the midpoint of p0 and p1 and adapt it.

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

Get the squared distance between two points in 2D.

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

Get the squared distance between two points.

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

Get the squared distance between two points in 2D.

Note
This method does not use the z-coordinate

◆ sqDistance2D() [2/2]

double GEOM_FADE25D::sqDistance2D ( const Point2 p0,
const Point2 p1 
)
inline

Get the squared distance between two points in 2D.

Note
This method does not use the z-coordinate