23#include <EBGeometry.hpp>
24#include <CD_NamespaceHeader.H>
29class Triangle :
public EBGeometry::Triangle<Real, std::array<Real, 3>>
35 using Vec3 = EBGeometry::Vec3T<Real>;
137#include <CD_NamespaceFooter.H>
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
Class that represents a single triangle together with associated metadata on the vertices (one float ...
Definition CD_Triangle.H:30
void setVertexPositions(const std::array< Vec3, 3 > &a_vertexPositions) noexcept
Set vertex positions and recompute the triangle area.
Definition CD_Triangle.cpp:32
static Real computeTriangleArea(const Vec3 &a_x1, const Vec3 &a_x2, const Vec3 &a_x3) noexcept
Compute the area of a triangle defined by three vertices.
Definition CD_Triangle.cpp:70
void computeArea() noexcept
Compute and store the triangle area in m_area.
Definition CD_Triangle.cpp:44
bool isInside(const Vec3 &a_point) const noexcept
Check if a point lies inside the triangle.
Definition CD_Triangle.cpp:56
EBGeometry::Vec3T< Real > Vec3
Alias for always-3D vector type.
Definition CD_Triangle.H:35
Triangle() noexcept
Default constructor.
Definition CD_Triangle.cpp:17
Real interpolate(const Vec3 &a_point) const noexcept
Interpolate vertex data at a point using barycentric coordinates or IDW fallback.
Definition CD_Triangle.cpp:79
void setVertexData(const std::array< Real, 3 > &a_vertexData) noexcept
Set meta-data on the vertices.
Definition CD_Triangle.cpp:38
Real m_area
Triangle area.
Definition CD_Triangle.H:123
Vec3 projectToTrianglePlane(const Vec3 &a_point) const noexcept
Project the input point to the triangle plane.
Definition CD_Triangle.cpp:50