13#include <lagrange/utils/span.h>
14#include <lagrange/utils/triangle_area.h>
27template <
typename Scalar>
34 Scalar _center[2]{(a[0] + b[0] + c[0] + d[0]) / 4, (a[1] + b[1] + c[1] + d[1]) / 4};
49template <
typename Scalar>
57 (a[0] + b[0] + c[0] + d[0]) / 4,
58 (a[1] + b[1] + c[1] + d[1]) / 4,
59 (a[2] + b[2] + c[2] + d[2]) / 4};
::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
Scalar quad_area_2d(span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c, span< const Scalar, 2 > d)
Compute 2D quad signed area.
Definition: quad_area.h:28
Scalar quad_area_3d(span< const Scalar, 3 > a, span< const Scalar, 3 > b, span< const Scalar, 3 > c, span< const Scalar, 3 > d)
Compute 3D quad area.
Definition: quad_area.h:50
Scalar triangle_area_2d(span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c)
Compute 2D triangle signed area.
Definition: triangle_area.h:48
Scalar triangle_area_3d(span< const Scalar, 3 > a, span< const Scalar, 3 > b, span< const Scalar, 3 > c)
Compute 3D triangle area.
Definition: triangle_area.h:29