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

Geometric functions in arbitrary dimension. More...

Go to the source code of this file.

Namespaces

 GEO
 Global Vorpaline namespace.
 
 GEO::Geom
 Geometric functions and utilities.
 

Functions

template<class COORD_T >
double GEO::Geom::distance2 (const COORD_T *p1, const COORD_T *p2, coord_index_t dim)
 Computes the squared distance between two nd points. More...
 
template<class COORD_T >
double GEO::Geom::distance (const COORD_T *p1, const COORD_T *p2, coord_index_t dim)
 Computes the distance between two nd points. More...
 
template<class VEC >
double GEO::Geom::distance2 (const VEC &p1, const VEC &p2)
 Computes the squared distance between two nd points. More...
 
template<class VEC >
double GEO::Geom::distance (const VEC &p1, const VEC &p2)
 Computes the distance between two nd points. More...
 
template<class COORD_T >
double GEO::Geom::triangle_area (const COORD_T *p1, const COORD_T *p2, const COORD_T *p3, coord_index_t dim)
 Computes the area of a nd triangle. More...
 
template<class COORD_T >
void GEO::Geom::triangle_centroid (const COORD_T *p, const COORD_T *q, const COORD_T *r, COORD_T a, COORD_T b, COORD_T c, double *Vg, double &V, coord_index_t dim)
 Computes the centroid of a 3d triangle with weighted points. More...
 
template<class VEC >
double GEO::Geom::triangle_area (const VEC &p1, const VEC &p2, const VEC &p3)
 Computes the area of a nd triangle. More...
 
template<class VEC >
double GEO::Geom::triangle_mass (const VEC &p, const VEC &q, const VEC &r, double a, double b, double c)
 Computes the mass of a nd triangle with weighted points. More...
 
template<class POINT >
POINT GEO::Geom::triangle_circumcenter (const POINT &Q1, const POINT &Q2, const POINT &Q3, double *denom=nullptr)
 Computes the center of the circumscribed circle of a nd triangle. More...
 
template<class VEC >
void GEO::Geom::triangle_centroid (const VEC &p, const VEC &q, const VEC &r, double a, double b, double c, VEC &Vg, double &V)
 Computes the centroid of a nd triangle with weighted points. More...
 
template<class VEC >
VEC GEO::Geom::random_point_in_triangle (const VEC &p1, const VEC &p2, const VEC &p3)
 Generates a random point in a nd triangle. More...
 
template<class VEC >
VEC GEO::Geom::random_point_in_tetra (const VEC &p1, const VEC &p2, const VEC &p3, const VEC &p4)
 Generates a random point in a nd tetrahedron. More...
 
template<class VEC >
double GEO::Geom::point_segment_squared_distance (const VEC &point, const VEC &V0, const VEC &V1, VEC &closest_point, double &lambda0, double &lambda1)
 Computes the point closest to a given point in a nd segment. More...
 
template<class VEC >
double GEO::Geom::point_segment_squared_distance (const VEC &point, const VEC &V0, const VEC &V1)
 Computes the point closest to a given point in a nd segment. More...
 
template<class VEC >
double GEO::Geom::point_triangle_squared_distance (const VEC &point, const VEC &V0, const VEC &V1, const VEC &V2, VEC &closest_point, double &lambda0, double &lambda1, double &lambda2)
 Computes the point closest to a given point in a nd triangle. More...
 
template<class VEC >
double GEO::Geom::point_triangle_squared_distance (const VEC &p, const VEC &q1, const VEC &q2, const VEC &q3)
 Computes the squared distance between a point and a nd triangle. More...
 
double GEO::Geom::tetra_volume_from_edge_lengths (double u, double U, double v, double V, double w, double W)
 Computes the volume of a tetrahedron from edge lengths. More...
 
template<class VEC >
double GEO::Geom::tetra_volume (const VEC &p1, const VEC &p2, const VEC &p3, const VEC &p4)
 Computes the volume of a nd tetrahedron. More...
 
template<int DIM>
double GEO::Geom::tetra_volume (const double *p1, const double *p2, const double *p3, const double *p4)
 Computes the volume of a nd tetrahedron. More...
 
template<>
double GEO::Geom::tetra_volume< 3 > (const double *p1, const double *p2, const double *p3, const double *p4)
 Computes the volume of a 3d tetrahedron. More...
 

Detailed Description

Geometric functions in arbitrary dimension.

Definition in file geometry_nd.h.