21 #ifndef __GEOMETRY_TOOLS_H 22 #define __GEOMETRY_TOOLS_H 24 #include "predicates.h" 40 double ayz[2] = {a.
y(), a.
z()};
41 double byz[2] = {b.
y(), b.
z()};
42 double cyz[2] = {c.
y(), c.
z()};
43 double azx[2] = {a.
z(), a.
x()};
44 double bzx[2] = {b.
z(), b.
x()};
45 double czx[2] = {c.
z(), c.
x()};
46 double axy[2] = {a.
x(), a.
y()};
47 double bxy[2] = {b.
x(), b.
y()};
48 double cxy[2] = {c.
x(), c.
y()};
57 const double a = ab.
x(), b = ab.
y(), c = ab.
z();
58 const double d = dc.
x(), e = dc.
y(), f = dc.
z();
59 const double g = ec.
x(), h = ec.
y(), i = ec.
z();
60 return a * (e * i - f * h)
62 + c * (d * h - e * g);
68 return (std::abs(v.
x()) >= std::abs(v.
y()) ? 0 : 1);
74 const double vx = std::abs(v.
x());
75 const double vy = std::abs(v.
y());
76 const double vz = std::abs(v.
z());
77 if (vx >= vy && vx >= vz)
87 dolfin_assert(axis <= 1);
94 dolfin_assert(axis <= 2);
97 case 0:
return Point(p.
y(), p.
z());
98 case 1:
return Point(p.
x(), p.
z());
99 case 2:
return Point(p.
x(), p.
y());
105 static inline bool contains(
double a,
double b,
double x)
107 return a <= x and x <= b;
113 return a < x and x < b;
double y() const
Definition: Point.h:118
double z() const
Definition: Point.h:125
double _orient2d(const double *a, const double *b, const double *c)
double x() const
Definition: Point.h:111