Geogram  Version 1.9.1
A programming library of geometric algorithms
exact_geometry.h File Reference

Exact predicates and constructs. More...

#include <geogram/basic/common.h>
#include <geogram/basic/geometry.h>
#include <geogram/basic/vechg.h>
#include <geogram/numerics/expansion_nt.h>
#include <geogram/numerics/interval_nt.h>
#include <geogram/numerics/predicates.h>
#include <geogram/numerics/exact_geometry.h>

Go to the source code of this file.

Namespaces

 GEO
 Global Vorpaline namespace.
 
 GEO::PCK
 PCK (Predicate Construction Kit) implements a set of geometric predicates. PCK uses arithmetic filters (Meyer and Pion), expansion arithmetics (Shewchuk) and simulation of simplicity (Edelsbrunner).
 
 GEO::exact
 Exact geometric types.
 

Typedefs

typedef vecng< 2, expansion_nt > GEO::vec2E
 vec2 with coordinates as expansions More...
 
typedef vecng< 3, expansion_nt > GEO::vec3E
 vec3 with coordinates as expansions More...
 
typedef vecng< 2, interval_nt > GEO::vec2I
 vec2 with coordinates as interval_nt More...
 
typedef vecng< 3, interval_nt > GEO::vec3I
 vec3 with coordinates as interval_nt More...
 
typedef vec2Hg< expansion_nt > GEO::vec2HE
 2D vector in homogeneous coordinates with coordinates as expansions More...
 
typedef vec3Hg< expansion_nt > GEO::vec3HE
 3D vector in homogeneous coordinates with coordinates as expansions More...
 
typedef vec2Hg< interval_nt > GEO::vec2HI
 2D vector in homogeneous coordinates with coordinates as intervals. More...
 
typedef vec3Hg< interval_nt > GEO::vec3HI
 3D vector in homogeneous coordinates with coordinates as intervals. More...
 
typedef expansion_nt GEO::exact::scalar
 
typedef vecng< 2, scalar > GEO::exact::vec2
 
typedef vecng< 3, scalar > GEO::exact::vec3
 
typedef vec2Hg< scalar > GEO::exact::vec2h
 2d vector with exact homogeneous coordinates
 
typedef vec3Hg< scalar > GEO::exact::vec3h
 3d vector with exact homogeneous coordinates
 
typedef rationalg< scalar > GEO::exact::rational
 rational with exact numerator and denominator
 

Functions

template<class VEC3 = vec3>
VEC3 GEO::make_vec3 (const vec3 &p1, const vec3 &p2)
 Creates a vector with coordinates of arbitrary type from two points with double coordinates. More...
 
template<class VEC2 >
VEC2 GEO::make_vec2 (const vec2 &p1, const vec2 &p2)
 Creates a vector with coordinates of arbitrary type from two points with double coordinates. More...
 
template<class VEC3 >
VEC3 GEO::triangle_normal (const vec3 &p1, const vec3 &p2, const vec3 &p3)
 Computes the normal to a triangle from its three vertices. More...
 
Sign GEO::PCK::orient_2d (const vec2HE &p0, const vec2HE &p1, const vec2HE &p2)
 Computes the orientation predicate in 2d. More...
 
Sign GEO::PCK::orient_2d_projected (const vec3HE &p0, const vec3HE &p1, const vec3HE &p2, coord_index_t axis)
 Computes the orientation predicate in 2d projected along an axis. More...
 
Sign GEO::PCK::orient_3d (const vec3HE &p0, const vec3HE &p1, const vec3HE &p2, const vec3HE &p3)
 Computes the orientation predicate in 3d. More...
 
Sign GEO::PCK::dot_2d (const vec2HE &p0, const vec2HE &p1, const vec2HE &p2)
 Computes the sign of the dot product between two vectors defined by three points. More...
 
Sign GEO::PCK::incircle_2d_SOS_with_lengths (const vec2HE &p0, const vec2HE &p1, const vec2HE &p2, const vec2HE &p3, double l0, double l1, double l2, double l3)
 Tests whether a point is in the circumscribed circle of three other points. More...
 
Sign GEO::PCK::incircle_2d_SOS (const vec2HE &p0, const vec2HE &p1, const vec2HE &p2, const vec2HE &p3)
 Tests whether a point is in the circumscribed circle of three other points. More...
 
coord_index_t GEO::PCK::triangle_normal_axis (const vec3 &p1, const vec3 &p2, const vec3 &p3)
 Gets the axis that is most normal to a triangle. More...
 
bool GEO::PCK::aligned_3d (const vec3HE &p0, const vec3HE &p1, const vec3HE &p2)
 Tests whether three 3d points are aligned. More...
 
bool GEO::PCK::on_segment_3d (const vec3HE &p, const vec3HE &q1, const vec3HE &q2)
 Tests whether a point is on a segment. More...
 
vec3 GEO::PCK::approximate (const vec3HE &p)
 Gets a 3D floating-point approximation of a 3D point with exact coordinates. More...
 
vec2 GEO::PCK::approximate (const vec2HE &p)
 Gets a 2D floating-point approximation of a 2D point with exact coordinates. More...
 
template<>
vec2E GEO::make_vec2< vec2E > (const vec2 &p1, const vec2 &p2)
 Specialization of make_vec2() for vec2E.
 
template<>
vec3E GEO::make_vec3< vec3E > (const vec3 &p1, const vec3 &p2)
 Specialization of make_vec3() for vec3E.
 

Detailed Description

Exact predicates and constructs.

Implements vector types with expansion coordinates (vec2E, vec3E), vector types with homogeneous expansion coordinates (vec2HE, vec3HE), 2d orientation predicate, incircle predicate and constructions for intersections.

Definition in file exact_geometry.h.