OGS
GeometricBasics.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <cstddef>
13#include <limits>
14
15namespace MathLib
16{
17class Point3d;
18
24
37double orientation3d(MathLib::Point3d const& p,
38 MathLib::Point3d const& a,
39 MathLib::Point3d const& b,
40 MathLib::Point3d const& c);
41
47 MathLib::Point3d const& b,
48 MathLib::Point3d const& c,
49 MathLib::Point3d const& d);
50
56double calcTriangleArea(MathLib::Point3d const& a, MathLib::Point3d const& b,
57 MathLib::Point3d const& c);
58
77 MathLib::Point3d const& b, MathLib::Point3d const& c,
78 MathLib::Point3d const& d,
79 double eps = std::numeric_limits<double>::epsilon());
80
99 MathLib::Point3d const& p,
100 MathLib::Point3d const& a,
101 MathLib::Point3d const& b,
102 MathLib::Point3d const& c,
103 double eps_pnt_out_of_plane = std::numeric_limits<float>::epsilon(),
104 double eps_pnt_out_of_tri = std::numeric_limits<float>::epsilon(),
106
125 MathLib::Point3d const& q, MathLib::Point3d const& a,
126 MathLib::Point3d const& b, MathLib::Point3d const& c,
127 double eps_pnt_out_of_plane = std::numeric_limits<float>::epsilon(),
128 double eps_pnt_out_of_tri = std::numeric_limits<float>::epsilon());
129
149 MathLib::Point3d const& p, MathLib::Point3d const& a,
150 MathLib::Point3d const& b, MathLib::Point3d const& c,
151 double eps_pnt_out_of_plane = std::numeric_limits<float>::epsilon(),
152 double eps_pnt_out_of_tri = std::numeric_limits<float>::epsilon());
153
159MathLib::Point3d const& b, MathLib::Point3d const& c);
160
171bool dividedByPlane(const MathLib::Point3d& a, const MathLib::Point3d& b,
172 const MathLib::Point3d& c, const MathLib::Point3d& d);
173
175bool isCoplanar(const MathLib::Point3d& a, const MathLib::Point3d& b,
176 const MathLib::Point3d& c, const MathLib::Point3d& d);
177
178} // end namespace MathLib
static const double q
double orientation3d(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c)
bool gaussPointInTriangle(MathLib::Point3d const &q, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, double eps_pnt_out_of_plane, double eps_pnt_out_of_tri)
double calcTriangleArea(MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c)
bool isCoplanar(const MathLib::Point3d &a, const MathLib::Point3d &b, const MathLib::Point3d &c, const MathLib::Point3d &d)
Checks if the four given points are located on a plane.
static const double p
bool dividedByPlane(const MathLib::Point3d &a, const MathLib::Point3d &b, const MathLib::Point3d &c, const MathLib::Point3d &d)
bool isPointInTriangle(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, double eps_pnt_out_of_plane, double eps_pnt_out_of_tri, MathLib::TriangleTest algorithm)
bool barycentricPointInTriangle(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, double eps_pnt_out_of_plane, double eps_pnt_out_of_tri)
double calcTetrahedronVolume(MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, MathLib::Point3d const &d)
bool isPointInTetrahedron(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, MathLib::Point3d const &d, double eps)
bool isPointInTriangleXY(MathLib::Point3d const &p, MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c)