PLaSK library
|
Represent FEM-like element (triangle) in TriangularMesh2D. More...
#include <plask/mesh/triangular2d.hpp>
Public Member Functions | |
Element (const TriangularMesh2D &mesh, TriangleNodeIndexes triangleNodes) | |
std::size_t | getNodeIndex (std::size_t index) const noexcept |
Get index of the triangle vertex in mesh (nodes vector). | |
const LocalCoords & | getNode (std::size_t index) const noexcept |
Get coordinates of the triangle vertex. | |
std::array< LocalCoords, 3 > | getNodes () const |
Get coordinates of the triangle vertices. | |
LocalCoords | getMidpoint () const |
Get centroid of the triangle corresponded to this element. | |
double | getArea () const noexcept |
Get area of the triangle represented by this element. | |
Vec< 3, double > | barycentric (Vec< 2, double > p) const |
Calculate barycentric (area) coordinates of the point p with respect to the triangle represented by this. | |
bool | contains (Vec< 2, double > p) const |
Check if point p is included in triangle represented by this element. | |
Box2D | getBoundingBox () const |
Calculate minimal rectangle which contains the triangle represented by the element. | |
Public Attributes | |
TriangleNodeIndexes | triangleNodes |
const TriangularMesh2D & | mesh |
Represent FEM-like element (triangle) in TriangularMesh2D.
Definition at line 53 of file triangular2d.hpp.
|
inline |
Definition at line 57 of file triangular2d.hpp.
Calculate barycentric (area) coordinates of the point p
with respect to the triangle represented by this.
p | point |
p
Definition at line 25 of file triangular2d.cpp.
Check if point p
is included in triangle represented by this
element.
p | point to check |
true
only if p
is included in this
Definition at line 120 of file triangular2d.hpp.
|
inlinenoexcept |
Get area of the triangle represented by this element.
Definition at line 99 of file triangular2d.hpp.
Box2D plask::TriangularMesh2D::Element::getBoundingBox | ( | ) | const |
Calculate minimal rectangle which contains the triangle represented by the element.
Definition at line 40 of file triangular2d.cpp.
|
inline |
Get centroid of the triangle corresponded to this element.
Definition at line 91 of file triangular2d.hpp.
|
inlinenoexcept |
Get coordinates of the triangle vertex.
index | index of vertex in the triangle corresponded to this element; equals to 0, 1 or 2 |
Definition at line 75 of file triangular2d.hpp.
|
inlinenoexcept |
Get index of the triangle vertex in mesh (nodes vector).
index | index of vertex in the triangle corresponded to this element; equals to 0, 1 or 2 |
Definition at line 65 of file triangular2d.hpp.
|
inline |
Get coordinates of the triangle vertices.
Definition at line 83 of file triangular2d.hpp.
const TriangularMesh2D& plask::TriangularMesh2D::Element::mesh |
Definition at line 55 of file triangular2d.hpp.
TriangleNodeIndexes plask::TriangularMesh2D::Element::triangleNodes |
Definition at line 54 of file triangular2d.hpp.