Class representing a surface segment of a FFaBody object.
More...
#include <FFaBody.H>
|
| | FaFace () |
| | Default face constructor. More...
|
| |
| | FaFace (FFaBody *body, size_t i1, size_t i2, size_t i3, int i4=-1) |
| | Constructor defining a face spanned by three or four vertices. More...
|
| |
| int | intersect (const FaVec3 &normal, double z0, double zeroTol=1.0e-16) |
| | Calculates the intersection with a given plane. More...
|
| |
| bool | isIntersected () const |
| | Returns true if face is intersected by the intersection plane. More...
|
| |
| bool | isBelow () const |
| | Returns true if face is totally below the intersection plane. More...
|
| |
| size_t | size () const |
| | Returns the number of face vertices. More...
|
| |
| size_t | operator[] (int i) const |
| | Returns the global index of the i'th vertex of this face. More...
|
| |
| const FaVec3 & | vertex (int i) const |
| | Returns the coordinates of the i'th vertex of this face. More...
|
| |
| double | accumulateArea (const FaVec3 &vn, const FaVec3 &v0, FaVec3 &X) const |
| | Accumulates area of an intersection surface. More...
|
| |
| double | accumulateVolume (const FaVec3 &v0, FaVec3 &X, FFaTensor3 *I) const |
| | Accumulates volume with contribution from *this as surface segment. More...
|
| |
| const std::vector< FaFace > & | getSubFaces () const |
| | Returns the sub-faces of the face when it is intersected. More...
|
| |
| FaEdge | getIntEdge () const |
| | Returns the index of the intersecting edge. More...
|
| |
| FaVec3 | getIntEdgeCoord () const |
| | Returns the sum of the end points of the intersecting edge. More...
|
| |
| FFaBody * | getBody () const |
| | Returns the owner of this face. More...
|
| |
|
| int | quad2Quads (const char *status, const double *dist) |
| | Divides the face into two quadrilateral sub-faces. More...
|
| |
| int | quad2QuadTria (const char *status, const double *dist, bool oneAbove) |
| | Divides the face into one triangle and two quadrilaterals. More...
|
| |
|
| std::ostream & | operator<< (std::ostream &s, const FaFace &f) |
| | Global stream operator printing the face definition. More...
|
| |
Class representing a surface segment of a FFaBody object.
The class also have data and methods for calculating the intersection of the face with a given plane.
◆ FaFace() [1/2]
Default face constructor.
◆ FaFace() [2/2]
| FaFace::FaFace |
( |
FFaBody * |
body, |
|
|
size_t |
i1, |
|
|
size_t |
i2, |
|
|
size_t |
i3, |
|
|
int |
i4 = -1 |
|
) |
| |
Constructor defining a face spanned by three or four vertices.
◆ accumulateArea()
| double FaFace::accumulateArea |
( |
const FaVec3 & |
vn, |
|
|
const FaVec3 & |
v0, |
|
|
FaVec3 & |
Xac |
|
) |
| const |
Accumulates area of an intersection surface.
This method accumulates area and centroid with contributions from a triangle defined by the two internal vertices of this face, the center vertex v0, and the normal vector vn of the face.
◆ accumulateVolume()
Accumulates volume with contribution from *this as surface segment.
This method accumulates volume, volume centroid, and optionally volume inertia with contributions from a tetrahedron defined by this face and the center vertex v0.
◆ getBody()
Returns the owner of this face.
◆ getIntEdge()
| FaEdge FaFace::getIntEdge |
( |
| ) |
const |
|
inline |
Returns the index of the intersecting edge.
◆ getIntEdgeCoord()
| FaVec3 FaFace::getIntEdgeCoord |
( |
| ) |
const |
Returns the sum of the end points of the intersecting edge.
◆ getSubFaces()
| const std::vector<FaFace>& FaFace::getSubFaces |
( |
| ) |
const |
|
inline |
Returns the sub-faces of the face when it is intersected.
◆ intersect()
| int FaFace::intersect |
( |
const FaVec3 & |
normal, |
|
|
double |
z0, |
|
|
double |
zeroTol = 1.0e-16 |
|
) |
| |
Calculates the intersection with a given plane.
This method determines the intersection between a triangular face and a plane defined by a normal vector and the distance z0 from the origin along the global z-axis. If the face is intersected, it is subdivided into two or three sub-faces with one or two new vertices.
- Returns
- -4: Intersection of quadrilateral not implemented
-
-1: The triangle is entirely below the plane
-
1: The triangle is entirely above the plane
-
0: The triangle lies in the plane
-
2: The triangle is intersected and divided in two sub-triangles
-
3: The triangle is intersected and divided in three sub-triangles
◆ isBelow()
| bool FaFace::isBelow |
( |
| ) |
const |
|
inline |
Returns true if face is totally below the intersection plane.
◆ isIntersected()
| bool FaFace::isIntersected |
( |
| ) |
const |
|
inline |
Returns true if face is intersected by the intersection plane.
◆ operator[]()
| size_t FaFace::operator[] |
( |
int |
i | ) |
const |
|
inline |
Returns the global index of the i'th vertex of this face.
◆ quad2Quads()
| int FaFace::quad2Quads |
( |
const char * |
status, |
|
|
const double * |
dist |
|
) |
| |
|
protected |
Divides the face into two quadrilateral sub-faces.
◆ quad2QuadTria()
| int FaFace::quad2QuadTria |
( |
const char * |
status, |
|
|
const double * |
dist, |
|
|
bool |
oneAbove |
|
) |
| |
|
protected |
Divides the face into one triangle and two quadrilaterals.
◆ size()
| size_t FaFace::size |
( |
| ) |
const |
|
inline |
Returns the number of face vertices.
◆ vertex()
| const FaVec3& FaFace::vertex |
( |
int |
i | ) |
const |
|
inline |
Returns the coordinates of the i'th vertex of this face.
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
s, |
|
|
const FaFace & |
f |
|
) |
| |
|
friend |
Global stream operator printing the face definition.
◆ IAmBelow
Is face below current intersection plane?
◆ iEdge
Vertices of the intersection edge, if any.
◆ mySubFaces
| std::vector<FaFace> FaFace::mySubFaces |
|
private |
2 or 3 sub-triangles of intersected face
◆ myVertices
| std::vector<size_t> FaFace::myVertices |
|
private |
Indices to the vertices defining the face.
◆ owner
Pointer to the body object containing this face.
The documentation for this class was generated from the following files:
- fedem-foundation/src/FFaLib/FFaAlgebra/FFaBody.H
- fedem-foundation/src/FFaLib/FFaAlgebra/FFaBody.C