Functions
geotests.hpp File Reference

Various checks for geometric data. More...

#include <vector>
#include "geometry.hpp"
#include "exactmath.hpp"
#include "../misc/triplet.hpp"
Include dependency graph for geotests.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double orient2d (const TripleConstRef< Vector2D > &points)
 Checks whether 3 given points are on a counterclockwise circle, clockwise circle or colinear. More...
 
double orient2dAdapt (const TripleConstRef< Vector2D > &points, double detsum)
 Checks whether 3 given points are on a counterclockwise circle, clockwise circle or colinear using adpative math. More...
 
double incircle (const Vector2D &point_1, const Vector2D &point_2, const Vector2D &point_3, const Vector2D &point_4)
 Checks whether the 4th point is inside, outside or on the counterclockwise circle created by the first 3 points. More...
 
double incircleadapt (const Vector2D &point_1, const Vector2D &point_2, const Vector2D &point_3, const Vector2D &point_4, double permanent)
 Checks whether the 4th point is inside, outside or on the counterclockwise circle created by the first 3 points using adaptive math. More...
 

Detailed Description

Various checks for geometric data.

Author
Elad Steinberg

Definition in file geotests.hpp.

Function Documentation

◆ incircle()

double incircle ( const Vector2D point_1,
const Vector2D point_2,
const Vector2D point_3,
const Vector2D point_4 
)

Checks whether the 4th point is inside, outside or on the counterclockwise circle created by the first 3 points.

Parameters
point_1First point
point_2Second point
point_3Third point
point_4Fourth point
Returns
The result will be positive, negative or 0 respectively.

Definition at line 567 of file geotests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ incircleadapt()

double incircleadapt ( const Vector2D point_1,
const Vector2D point_2,
const Vector2D point_3,
const Vector2D point_4,
double  permanent 
)

Checks whether the 4th point is inside, outside or on the counterclockwise circle created by the first 3 points using adaptive math.

Parameters
point_1First point
point_2Second point
point_3Third point
point_4Fourth point
permanentThe error estimate
Returns
The result will be positive, negative or 0 respectively.

Definition at line 124 of file geotests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orient2d()

double orient2d ( const TripleConstRef< Vector2D > &  points)

Checks whether 3 given points are on a counterclockwise circle, clockwise circle or colinear.

Parameters
pointsThe three points to check
Returns
The result will be positive, negative or 0 respectively.

Definition at line 76 of file geotests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orient2dAdapt()

double orient2dAdapt ( const TripleConstRef< Vector2D > &  points,
double  detsum 
)

Checks whether 3 given points are on a counterclockwise circle, clockwise circle or colinear using adpative math.

Parameters
pointsThe three points to check
detsumThe determinant obtained from orient2d
Returns
The result will be positive, negative or 0 respectively.

Definition at line 4 of file geotests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: