12#ifndef ARCANE_CORE_GEOMETRICUTILITIES_H
13#define ARCANE_CORE_GEOMETRICUTILITIES_H
17#include "arcane/utils/Real3.h"
18#include "arcane/utils/Real3x3.h"
40class ARCANE_CORE_EXPORT QuadMapping
44 QuadMapping() =
default;
49 Real m_precision = 1.0e-14;
59 Real x0 = (1.0 - u) * (1.0 - v);
60 Real x1 = (1.0 + u) * (1.0 - v);
61 Real x2 = (1.0 + u) * (1.0 + v);
62 Real x3 = (1.0 - u) * (1.0 + v);
64 return 0.25 * (m_pos[0] * x0 + m_pos[1] * x1 + m_pos[2] * x2 + m_pos[3] * x3);
71 Real t1 = 0.25 * (v - 1.0);
72 Real t2 = 0.25 * (v + 1.0);
73 Real t3 = 0.25 * (u - 1.0);
74 Real t4 = 0.25 * (-u - 1.0);
76 return Real3x3(m_pos[0] * t1 - m_pos[1] * t1 + m_pos[2] * t2 - m_pos[3] * t2,
77 m_pos[0] * t3 + m_pos[1] * t4 - m_pos[2] * t4 - m_pos[3] * t3,
98class ARCANE_CORE_EXPORT ProjectionInfo
102 ProjectionInfo(
Real distance,
int region,
Real alpha,
Real beta,
Real3 aprojection)
109 ProjectionInfo() =
default;
Information about the floating-point type.
Real3 m_projection
Position of the projection.
static ProjectionInfo projection(Real3 v1, Real3 v2, Real3 v3, Real3 point)
Projection of point point onto the triangle defined by v1, v2 and v3.
int m_region
Region where the projection is located (0 if inside the segment or triangle).
Real m_alpha
Barycentric x-coordinate of the projection.
static bool isInside(Real3 v1, Real3 v2, Real3 v3, Real3 point)
Indicates if the projection of point point is inside the triangle defined by v1, v2 and v3.
Real m_distance
Distance of the point to its projection.
Real m_beta
Barycentric y-coordinate of the projection.
Real3 evaluatePosition(Real3 iso) const
Calculates Cartesian coordinates from iso-barycentric coordinates.
Class managing a 3-dimensional real vector.
Class managing a 3x3 real matrix.
Utility functions on geometry.
double Real
Type representing a real number.
Real y
second component of the triplet
Real x
first component of the triplet