GEOS  3.14.0dev
Public Types | Static Public Member Functions | List of all members
geos::triangulate::quadedge::TrianglePredicate Class Reference

Algorithms for computing values and predicates associated with triangles. More...

#include <TrianglePredicate.h>

Public Types

using CoordinateXY = geos::geom::CoordinateXY
 

Static Public Member Functions

static geom::Location isInCircleNonRobust (const CoordinateXY &a, const CoordinateXY &b, const CoordinateXY &c, const CoordinateXY &p)
 
static geom::Location isInCircleNormalized (const CoordinateXY &a, const CoordinateXY &b, const CoordinateXY &c, const CoordinateXY &p)
 
static geom::Location isInCircleRobust (const CoordinateXY &a, const CoordinateXY &b, const CoordinateXY &c, const CoordinateXY &p)
 

Detailed Description

Algorithms for computing values and predicates associated with triangles.

For some algorithms extended-precision implementations are provided, which are more robust (i.e. they produce correct answers in more cases). Also, some more robust formulations of some algorithms are provided, which utilize normalization to the origin.

Author
JTS: Martin Davis
Benjamin Campbell

Member Function Documentation

◆ isInCircleNonRobust()

static geom::Location geos::triangulate::quadedge::TrianglePredicate::isInCircleNonRobust ( const CoordinateXY &  a,
const CoordinateXY &  b,
const CoordinateXY &  c,
const CoordinateXY &  p 
)
static

Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). This test uses simple double-precision arithmetic, and thus may not be robust.

Parameters
aa vertex of the triangle
ba vertex of the triangle
ca vertex of the triangle
pthe point to test
Returns
true if this point is inside the circle defined by the points a, b, c

◆ isInCircleNormalized()

static geom::Location geos::triangulate::quadedge::TrianglePredicate::isInCircleNormalized ( const CoordinateXY &  a,
const CoordinateXY &  b,
const CoordinateXY &  c,
const CoordinateXY &  p 
)
static

Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). This test uses simple double-precision arithmetic, and thus is not 10% robust. However, by using normalization to the origin it provides improved robustness and increased performance.

Based on code by J.R.Shewchuk.

Parameters
aa vertex of the triangle
ba vertex of the triangle
ca vertex of the triangle
pthe point to test
Returns
true if this point is inside the circle defined by the points a, b, c

Referenced by geos::geom::CircularArc::containsPoint().

◆ isInCircleRobust()

static geom::Location geos::triangulate::quadedge::TrianglePredicate::isInCircleRobust ( const CoordinateXY &  a,
const CoordinateXY &  b,
const CoordinateXY &  c,
const CoordinateXY &  p 
)
static

Tests if a point is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise). This method uses more robust computation.

Parameters
aa vertex of the triangle
ba vertex of the triangle
ca vertex of the triangle
pthe point to test
Returns
true if this point is inside the circle defined by the points a, b, c

Referenced by geos::triangulate::quadedge::Vertex::isInCircle().


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