11#ifndef EBGEOMETRY_TRIANGLE_HPP
12#define EBGEOMETRY_TRIANGLE_HPP
53 static_assert(std::is_floating_point_v<T>,
"T must be a floating-point type");
100 operator=(const
Triangle& a_otherTriangle) noexcept = default;
108 operator=(
Triangle&& a_otherTriangle) noexcept = default;
166 [[nodiscard]] const
Vec3&
198 [[nodiscard]] uint32_t
239#include "EBGeometry_TriangleImplem.hpp"
A fixed-size array that compiles for both host and device.
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
Triangle class with signed distance functionality.
Definition EBGeometry_Triangle.hpp:52
const Vec3 & getNormal() const noexcept
Get the triangle normal vector.
Array< Vec3, 3 > m_edgeNormals
Triangle edge normals.
Definition EBGeometry_Triangle.hpp:230
void setNormal(const Vec3 &a_normal) noexcept
Set the triangle normal vector.
uint32_t getFaceId() const noexcept
Get the face id.
uint32_t m_faceId
Id of the face this triangle belongs to, UINT32_MAX if unset.
Definition EBGeometry_Triangle.hpp:235
void setFaceId(const uint32_t a_faceId) noexcept
Set the face id.
const Array< Vec3, 3 > & getVertexPositions() const noexcept
Get the vertex positions.
void setVertexNormals(const Array< Vec3, 3 > &a_vertexNormals) noexcept
Set the triangle vertex normals.
Triangle() noexcept=default
Default constructor. Does not put the triangle in a usable state.
void setEdgeNormals(const Array< Vec3, 3 > &a_edgeNormals) noexcept
Set the triangle edge normals.
Array< Vec3, 3 > m_vertexNormals
Triangle vertex normals.
Definition EBGeometry_Triangle.hpp:225
Vec3 m_triangleNormal
Triangle face normal.
Definition EBGeometry_Triangle.hpp:215
void computeNormal() noexcept
Compute the triangle normal vector.
Array< Vec3, 3 > m_vertexPositions
Triangle vertex positions.
Definition EBGeometry_Triangle.hpp:220
const Array< Vec3, 3 > & getVertexNormals() const noexcept
Get the vertex normals.
T signedDistance(const Vec3 &a_point) const noexcept
Compute the signed distance from the input point x to the triangle.
void setVertexPositions(const Array< Vec3, 3 > &a_vertexPositions) noexcept
Set the triangle vertex positions.
const Array< Vec3, 3 > & getEdgeNormals() const noexcept
Get the edge normals.
Two-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:37
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
static constexpr Vec3T< T > max() noexcept
Return the most-positive representable vector.
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Vec2T< T > max(const Vec2T< T > &u, const Vec2T< T > &v) noexcept
Component-wise maximum of two vectors.
Fixed-size array with host- and device-callable members.
Definition EBGeometry_Array.hpp:33