DOLFIN-X
DOLFIN-X C++ interface
predicates.h
1 #include <Eigen/Dense>
2 
3 #pragma once
4 
5 namespace dolfinx::geometry
6 {
7 class Point;
8 
10 void exactinit();
11 
13 double orient1d(double a, double b, double x);
14 
16 double orient2d(const Eigen::Vector3d& a, const Eigen::Vector3d& b,
17  const Eigen::Vector3d& c);
18 
20 double orient3d(const Eigen::Vector3d& a, const Eigen::Vector3d& b,
21  const Eigen::Vector3d& c, const Eigen::Vector3d& d);
22 
26 
28 {
29 public:
31 };
32 
33 // Compute relative orientation of points a, b, c. The orientation is
34 // such that orient2d(a, b, c) > 0 if a, b, c are ordered
35 // counter-clockwise.
36 double _orient2d(const double* a, const double* b, const double* c);
37 
38 // Compute relative orientation of points a, b, c, d. The orientation is
39 // such that orient3d(a, b, c, d) > 0 if a, b, c, d are oriented
40 // according to the left hand rule.
41 double _orient3d(const double* a, const double* b, const double* c,
42  const double* d);
43 
44 } // namespace dolfinx::geometry
dolfinx::geometry::orient2d
double orient2d(const Eigen::Vector3d &a, const Eigen::Vector3d &b, const Eigen::Vector3d &c)
Convenience function using Eigen.
Definition: predicates.cpp:13
dolfinx::geometry::exactinit
void exactinit()
Initialize tolerances for exact arithmetic.
Definition: predicates.cpp:678
dolfinx::geometry::orient1d
double orient1d(double a, double b, double x)
Compute relative orientation of point x wrt segment [a, b].
Definition: predicates.cpp:4
dolfinx::geometry
Geometry data structures and algorithms.
Definition: Function.h:23
dolfinx::geometry::PredicateInitialization
Class used for automatic initialization of tolerances at startup. A global instance is defined inside...
Definition: predicates.h:27
dolfinx::geometry::orient3d
double orient3d(const Eigen::Vector3d &a, const Eigen::Vector3d &b, const Eigen::Vector3d &c, const Eigen::Vector3d &d)
Convenience function using Eigen.
Definition: predicates.cpp:20