14#include <lagrange/ExactPredicates.h>
15#include <lagrange/utils/span.h>
19enum class Orientation :
short {
35template <
typename Scalar>
42 if constexpr (std::is_same_v<Scalar, double>) {
43 return static_cast<Orientation
>(predicates.
orient2D(
44 const_cast<double*
>(a.data()),
45 const_cast<double*
>(b.data()),
46 const_cast<double*
>(c.data())));
49 static_cast<double>(a[0]),
50 static_cast<double>(a[1]),
51 static_cast<double>(b[0]),
52 static_cast<double>(b[1]),
53 static_cast<double>(c[0]),
54 static_cast<double>(c[1])};
55 return static_cast<Orientation
>(predicates.
orient2D(data, data + 2, data + 4));
Definition: ExactPredicatesShewchuk.h:19
virtual short orient2D(double p1[2], double p2[2], double p3[2]) const
Exact 2D orientation test.
Definition: ExactPredicatesShewchuk.cpp:36
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition: span.h:27
Main namespace for Lagrange.
Definition: AABBIGL.h:30
enum lagrange::Orientation short triangle_orientation(span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c)
Compute orientation of a 2D triangle.
Definition: triangle_orientation_2d.h:36