12#ifndef EBGeometry_Triangle
13#define EBGeometry_Triangle
47 template <
class T,
class Meta>
260#include "EBGeometry_TriangleImplem.hpp"
Declaration of a class that encapsulates the projection of a 3D triangle into a 2D plane.
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Vec2T< T > max(const Vec2T< T > &u, const Vec2T< T > &v) noexcept
Maximum function. Returns new vector with component-wise minimums.
Triangle class with signed distance functionality.
Definition EBGeometry_Triangle.hpp:49
std::array< Vec3, 3 > & getVertexNormals() noexcept
Get the vertex normals.
std::array< Vec3, 3 > & getEdgeNormals() noexcept
Get the edge normals.
std::array< Vec3, 3 > & getVertexPositions() noexcept
Get the vertex positions.
void setNormal(const Vec3 &a_normal) noexcept
Set the triangle normal vector.
std::array< Vec3, 3 > m_edgeNormals
Triangle edge normals.
Definition EBGeometry_Triangle.hpp:234
std::array< Vec3, 3 > m_vertexNormals
Triangle vertex normals.
Definition EBGeometry_Triangle.hpp:230
T projectPointToEdge(const Vec3 &a_point, const Vec3 &a_x0, const Vec3 &a_x1) const noexcept
Returns the "projection" of a point to an edge.
Vec3 m_triangleNormal
Triangle face normal.
Definition EBGeometry_Triangle.hpp:220
void setEdgeNormals(const std::array< Vec3, 3 > &a_edgeNormals) noexcept
Set the triangle edge normals.
Triangle2D< T > m_triangle2D
2D projection of the triangle to one of the Cartesian coordinate directions
Definition EBGeometry_Triangle.hpp:239
Meta & getMetaData() noexcept
Get the triangle meta-data.
void computeNormal() noexcept
Compute the triangle normal vector.
void setMetaData(const Meta &a_metaData) noexcept
Set the triangle meta-data.
Meta m_metaData
Triangle meta-data normals.
Definition EBGeometry_Triangle.hpp:244
std::array< Vec3, 3 > m_vertexPositions
Triangle vertex positions.
Definition EBGeometry_Triangle.hpp:225
void setVertexNormals(const std::array< Vec3, 3 > &a_vertexNormals) noexcept
Set the triangle vertex normals.
Vec3 & getNormal() noexcept
Get the triangle normal vector.
T signedDistance(const Vec3 &a_point) const noexcept
Compute the signed distance from the input point x to the triangle.
Triangle() noexcept=default
Default constructor. Does not put the triangle in a usable state.
void setVertexPositions(const std::array< Vec3, 3 > &a_vertexPositions) noexcept
Set the triangle vertex positions.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
static constexpr Vec3T< T > max() noexcept
Return a vector with maximum representable components.
Name space for all of EBGeometry.
Definition EBGeometry.hpp:23