22#include <EBGeometry.hpp>
23#include <CD_NamespaceHeader.H>
28class Triangle :
public EBGeometry::Triangle<Real, std::array<Real, 3>>
34 using Vec3 = EBGeometry::Vec3T<Real>;
136#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:37
Class that represents a single triangle together with associated metadata on the vertices (one float ...
Definition CD_Triangle.H:29
void setVertexPositions(const std::array< Vec3, 3 > &a_vertexPositions) noexcept
Set vertex positions and recompute the triangle area.
Definition CD_Triangle.cpp:32
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:34
Triangle() noexcept
Default constructor.
Definition CD_Triangle.cpp:16
Real interpolate(const Vec3 &a_point) const noexcept
Interpolate vertex data at a point using barycentric coordinates or IDW fallback.
Definition CD_Triangle.cpp:83
Real computeTriangleArea(const Vec3 a_x1, const Vec3 a_x2, const Vec3 a_x3) const noexcept
Compute the area of a triangle defined by three vertices.
Definition CD_Triangle.cpp:74
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:122
Vec3 projectToTrianglePlane(const Vec3 &a_point) const noexcept
Project the input point to the triangle plane.
Definition CD_Triangle.cpp:50