#include "common.h"
#include "Vector2.h"
#include <cstring>
Go to the source code of this file.
|
Point2 | GEOM_FADE25D::center (const Point2 &p0, const Point2 &p1) |
| Compute the midpoint of points p0 and p1. More...
|
|
std::ostream & | GEOM_FADE25D::operator<< (std::ostream &stream, const Point2 &pnt) |
| Print to output stream. More...
|
|
std::istream & | GEOM_FADE25D::operator>> (std::istream &stream, Point2 &pnt) |
| Read coordinates from an input stream into a Point2. More...
|
|
double | GEOM_FADE25D::sqDistance25D (const double x0, const double y0, const double z0, const Point2 &p1) |
| Get the squared 2.5D distance between two points. More...
|
|
double | GEOM_FADE25D::sqDistance25D (const Point2 &p0, const Point2 &p1) |
| Get the squared 2.5D distance between two points. More...
|
|
double | GEOM_FADE25D::sqDistance2D (const double x0, const double y0, const Point2 &p1) |
| Get the squared 2D distance between two points. More...
|
|
double | GEOM_FADE25D::sqDistance2D (const Point2 &p0, const Point2 &p1) |
| Get the squared 2D distance between two points. More...
|
|
◆ CINC2
This enumeration describes the possible positions of a point in relation to a circle.
Enumerator |
---|
CINC2_UNKNOWN | Invalid value (undefined)
|
CINC2_ZERO | Point lies exactly on the circumference of the circle.
|
CINC2_INCIRCLE | Point lies inside the circle.
|
CINC2_OUTCIRCLE | Point lies outside the circle.
|
◆ center()
Point2 GEOM_FADE25D::center |
( |
const Point2 & |
p0, |
|
|
const Point2 & |
p1 |
|
) |
| |
|
inline |
This function calculates the midpoint between two given points, p0
and p1
.
- Parameters
-
p0 | First point |
p1 | Second point |
- Returns
- The computed midpoint
- Note
- The exact midpoint of
p0
and p1
may not exist in floating-point numbers due to limited precision. As a result, the returned point may not be perfectly collinear with p0
and p1
.
◆ operator<<()
std::ostream& GEOM_FADE25D::operator<< |
( |
std::ostream & |
stream, |
|
|
const Point2 & |
pnt |
|
) |
| |
|
inline |
Prints a Point2 to an output stream.
- Parameters
-
stream | The output stream. |
pnt | The Point2 to be printed. |
- Returns
- The output stream.
◆ operator>>()
std::istream& GEOM_FADE25D::operator>> |
( |
std::istream & |
stream, |
|
|
Point2 & |
pnt |
|
) |
| |
|
inline |
Reads coordinates from a stream into a Point2.
- Parameters
-
stream | The input stream. |
pnt | The Point2 to be populated with data. |
- Returns
- The input stream.
◆ sqDistance25D() [1/2]
double GEOM_FADE25D::sqDistance25D |
( |
const double |
x0, |
|
|
const double |
y0, |
|
|
const double |
z0, |
|
|
const Point2 & |
p1 |
|
) |
| |
|
inline |
Computes the squared 2.5D distance between two points
- Parameters
-
x0,y0,z0 | The coordinates of the first point |
p1 | The second point |
- Returns
- The squared 2.5D distance between the specified points.
◆ sqDistance25D() [2/2]
double GEOM_FADE25D::sqDistance25D |
( |
const Point2 & |
p0, |
|
|
const Point2 & |
p1 |
|
) |
| |
|
inline |
Computes the squared 2.5D distance between two points.
- Parameters
-
p0,p1 | The Point2 objects whose squared 2.5D distance is to be computed |
- Returns
- The squared 2.5D distance between
p0
and p1
◆ sqDistance2D() [1/2]
double GEOM_FADE25D::sqDistance2D |
( |
const double |
x0, |
|
|
const double |
y0, |
|
|
const Point2 & |
p1 |
|
) |
| |
|
inline |
Computes the squared distance between two points
- Parameters
-
x0,y0 | The coordinates of the first point |
p1 | The second point |
- Returns
- The squared 2D distance between the specified points.
- Note
- This method returns the 2D distance, it does not consider the z-coordinate
◆ sqDistance2D() [2/2]
double GEOM_FADE25D::sqDistance2D |
( |
const Point2 & |
p0, |
|
|
const Point2 & |
p1 |
|
) |
| |
|
inline |
Computes the squared distance between two points
- Parameters
-
p0,p1 | The Point2 objects whose squared distance is to be computed |
- Returns
- The squared 2D distance between
p0
and p1
.
- Note
- This method returns the 2D distance, it does not consider the z-coordinate