19#ifndef UTILS_MATH_TRIANGLE_FUNCTIONS_HPP
20#define UTILS_MATH_TRIANGLE_FUNCTIONS_HPP
39 auto const u =
P2 -
P1;
40 auto const v =
P3 -
P1;
88 auto const phi = std::numbers::pi - std::acos(
cosine);
100 return 2. * std::numbers::pi -
phi;
Vector implementation and trait types for boost qvm interoperability.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
double angle_btw_triangles(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3, const Vector3d &P4)
Computes the angle between two triangles in 3D space.
Vector< T, 3 > vector_product(Vector< T, 3 > const &a, Vector< T, 3 > const &b)
double area_triangle(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
Computes the area of triangle between vectors P1,P2,P3, by computing the cross product P1P2 x P1P3 an...
Vector3d get_n_triangle(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
Computes the normal vector of a triangle.