Loading...
Searching...
No Matches
triFace Class Reference

A triangular face using a FixedList of labels corresponding to mesh vertices. More...

#include <triFace.H>

Inheritance diagram for triFace:
Collaboration diagram for triFace:

Classes

struct  hasher
 Hashing functor for triFace (commutative). More...
struct  Hash
 Deprecated(2021-04) hashing functor. Use hasher(). More...

Public Member Functions

void front ()=delete
 The front() accessor (from FixedList) has no purpose.
void back ()=delete
 The back() accessor (from FixedList) has no purpose.
 triFace ()
 Default construct, with invalid vertex labels (-1).
 triFace (const label p0, const label p1, const label p2) noexcept
 Construct from three vertex labels.
 triFace (std::initializer_list< label > list)
 Construct from an initializer list of three vertex labels.
 triFace (const labelUList &list)
 Copy construct from a list of three vertex labels.
 triFace (const labelUList &list, const FixedList< label, 3 > &indices)
 Copy construct from a subset of vertex labels.
 triFace (Istream &is)
 Construct from Istream.
label a () const noexcept
 The first vertex.
label b () const noexcept
 The second vertex.
label c () const noexcept
 The third vertex.
label & a () noexcept
 The first vertex.
label & b () noexcept
 The second vertex.
label & c () noexcept
 The third vertex.
bool good () const noexcept
 True if vertices are unique and non-negative.
label collapse ()
 'Collapse' face by marking duplicate vertex labels.
void flip ()
 Flip the face in-place.
pointField points (const UList< point > &pts) const
 Return the points corresponding to this face.
face triFaceFace () const
 Return triangle as a face.
triPointRef tri (const UList< point > &points) const
 Return the triangle.
point centre (const UList< point > &points) const
 Return centre (centroid).
template<class Type>
Type average (const UList< point > &unused, const Field< Type > &fld) const
 Calculate average value at centroid of face.
vector areaNormal (const UList< point > &points) const
 The area normal - with magnitude equal to area of face.
vector unitNormal (const UList< point > &points) const
 The unit normal.
 FOAM_DEPRECATED_FOR (2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &points) const
 Legacy name for areaNormal().
scalar mag (const UList< point > &points) const
 Magnitude of face area.
scalar magSqr (const UList< point > &points) const
 Magnitude squared of face area.
Pair< pointbox (const UList< point > &points) const
 The enclosing (bounding) box for the face.
label nTriangles () const noexcept
 Number of triangles after splitting == 1.
triFace reverseFace () const
 Return face with reverse direction.
label which (const label vertex) const
 Find local vertex on face for the vertex label, same as find().
label nextLabel (const label i) const
 Next vertex on face.
label prevLabel (const label i) const
 Previous vertex on face.
label thisLabel (const label i) const
 The vertex on face - identical to operator[], but with naming similar to nextLabel(), prevLabel().
scalar sweptVol (const UList< point > &opts, const UList< point > &npts) const
 Return swept-volume from old-points to new-points.
tensor inertia (const UList< point > &points, const point &refPt=vector::zero, scalar density=1.0) const
 Return the inertia tensor, with optional reference.
pointHit ray (const point &p, const vector &q, const UList< point > &points, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Return point intersection with a ray starting at p, in direction q.
pointHit intersection (const point &p, const vector &q, const UList< point > &points, const intersection::algorithm alg, const scalar tol=0.0) const
 Fast intersection with a ray.
pointHit intersection (const point &p, const vector &q, const point &ctr, const UList< point > &points, const intersection::algorithm alg, const scalar tol=0.0) const
pointHit nearestPoint (const point &p, const UList< point > &points) const
 Return nearest point to face.
pointHit nearestPointClassify (const point &p, const UList< point > &points, label &nearType, label &nearLabel) const
 Return nearest point to face and classify it:
int sign (const point &p, const UList< point > &points, const scalar tol=SMALL) const
 The sign for which side of the face plane the point is on.
label nEdges () const noexcept
 Return number of edges == 3.
Foam::edge edge (const label edgei) const
 Return i-th face edge (forward walk order).
vector edge (const label edgei, const UList< point > &pts) const
 Return vector of i-th face edge (forward walk order).
Foam::edge rcEdge (const label edgei) const
 Return i-th face edge in reverse walk order.
vector rcEdge (const label edgei, const UList< point > &pts) const
 Return vector of i-th face edge in reverse walk order.
edgeList edges () const
 Return list of edges in forward walk order.
edgeList rcEdges () const
 Return list of edges in reverse walk order.
bool contains (const Foam::edge &e) const
 True if face contains(edge).
label find (const Foam::edge &e) const
 Find the edge within the face.
int edgeDirection (const Foam::edge &e) const
 Test the edge direction on the face.
void operator+= (const label vertexOffset)
 Increment (offset) vertices by given amount.
unsigned hash_code (unsigned seed=0) const
 The (commutative) hash value for triFace.
bool valid () const noexcept
 Same as good().
Foam::edge faceEdge (label edgei) const
 Identical to edge().
Public Member Functions inherited from FixedList< label, 3 >
 FixedList ()=default
 Default construct.
autoPtr< FixedList< label, N > > clone () const
 Clone.
const label * cdata () const noexcept
 Return pointer to the underlying array serving as data storage.
label * data () noexcept
 Return pointer to the underlying array serving as data storage.
const char * cdata_bytes () const noexcept
 Return pointer to the underlying array serving as data storage,.
char * data_bytes () noexcept
 Return pointer to the underlying array serving as data storage,.
label & get () noexcept
 Element access using compile-time indexing.
label & front () noexcept
 Access first element of the list, position [0].
label & back () noexcept
 Access last element of the list, position [N-1].
label fcIndex (const label i) const noexcept
 Return the forward circular index, i.e. next index which returns to the first at the end of the list.
const label & fcValue (const label i) const
 Return forward circular value (ie, next value in the list).
label rcIndex (const label i) const noexcept
 Return the reverse circular index, i.e. previous index which returns to the last at the beginning of the list.
const label & rcValue (const label i) const
 Return reverse circular value (ie, previous value in the list).
void checkStart (const label start) const
 Check start is within valid range [0,size).
void checkSize (const label size) const
 Check size is identical to template parameter N.
void checkIndex (const label i) const
 Check index is within valid range [0,N).
bool uniform () const
 True if all entries have identical values, and list is non-empty.
bool contains (const label &val) const
 True if the value is contained in the list.
label find (const label &val) const
 Find index of the first occurrence of the value.
label rfind (const label &val, label pos=-1) const
 Find index of the last occurrence of the value.
void resize (const label n)
 Dummy function, to make FixedList consistent with List Any resizing is ignored (Fatal with bad sizing in full debug).
void resize_fill (const label n, const label &val)
 Set val for all elements. Any resizing is ignored (Fatal with bad sizing in full debug).
void resize_nocopy (const label n)
 Dummy function, to make FixedList consistent with List Any resizing is ignored (Fatal with bad sizing in full debug).
void setSize (const label n)
 Dummy function, to make FixedList consistent with List.
void fill (const label &val)
 Assign all entries to the given value.
void moveFirst (const label i)
 Move element to the first position.
void moveLast (const label i)
 Move element to the last position.
void swapFirst (const label i)
 Swap element with the first element.
void swapLast (const label i)
 Swap element with the last element.
void transfer (FixedList< label, N > &list)
 Transfer by swapping using a move assignment for the content of the individual list elements.
label & operator[] (const label i)
 Return element of FixedList.
void operator= (const UList< label > &list)
 Assignment to UList operator. Takes linear time.
iterator begin () noexcept
 Return an iterator to begin traversing the FixedList.
iterator end () noexcept
 Return an iterator to end traversing the FixedList.
const_iterator cbegin () const noexcept
 Return const_iterator to begin traversing the constant FixedList.
const_iterator cend () const noexcept
 Return const_iterator to end traversing the constant FixedList.
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the FixedList.
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the FixedList.
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing FixedList.
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing FixedList.
void swap (FixedList< label, N > &other)
 Swap lists by swapping the content of the individual list elements.
bool operator== (const FixedList< label, N > &list) const
 Equality operation on FixedLists of the same type.
bool operator!= (const FixedList< label, N > &list) const
 The opposite of the equality operation. Takes linear time.
bool operator< (const FixedList< label, N > &list) const
 Compare two FixedLists lexicographically. Takes linear time.
bool operator> (const FixedList< label, N > &list) const
 Compare two FixedLists lexicographically. Takes linear time.
bool operator<= (const FixedList< label, N > &list) const
 Return true if !(a > b). Takes linear time.
bool operator>= (const FixedList< label, N > &list) const
 Return true if !(a < b). Takes linear time.
IstreamreadList (Istream &is)
 Read from Istream, discarding contents of existing List.
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write List, with line-breaks in ASCII when length exceeds shortLen.
label & first () noexcept
 Access first element of the list, position [0] - front().
label & last () noexcept
 Access last element of the list, position [N-1] - back().
bool found (const label &val, label pos=0) const
 Same as contains().

Static Public Member Functions

static int compare (const triFace &a, const triFace &b)
 Compare triFaces.
Static Public Member Functions inherited from FixedList< label, 3 >
static const FixedList< label, N > & null () noexcept
 Return a null FixedList (reference to a nullObject). Read/write access is questionable.
static std::streamsize size_bytes () noexcept
 Number of contiguous bytes for the list data,.
static std::streamsize byteSize ()
 Number of contiguous bytes for the list data, runtime FatalError if type is not contiguous.
static constexpr bool empty () noexcept
 Always false since zero-sized FixedList is compile-time disabled.
static constexpr label size () noexcept
 Return the number of elements in the FixedList.
static constexpr unsigned max_size () noexcept
 The dimensioned size (template parameter N) of the FixedList.

Additional Inherited Members

Public Types inherited from FixedList< label, 3 >
typedef label value_type
 The value type the FixedList contains.
typedef label * pointer
 The pointer type for non-const access to value_type items.
typedef const label * const_pointer
 The pointer type for const access to value_type items.
typedef label & reference
 The type used for storing into value_type objects.
typedef const label & const_reference
 The type used for reading from constant value_type objects.
typedef label * iterator
 Random access iterator for traversing FixedList.
typedef const label * const_iterator
 Random access iterator for traversing FixedList.
typedef label size_type
 The type to represent the size of a FixedList.
typedef label difference_type
 The difference between iterator objects.
typedef std::reverse_iterator< iteratorreverse_iterator
 Reverse iterator (non-const access).
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Reverse iterator (const access).
Protected Member Functions inherited from FixedList< label, 3 >
void writeEntry (Ostream &os) const
 Write the FixedList with its compound type.

Detailed Description

A triangular face using a FixedList of labels corresponding to mesh vertices.

See also
Foam::face, Foam::triangle
Source files

Definition at line 65 of file triFace.H.

Constructor & Destructor Documentation

◆ triFace() [1/6]

triFace ( )
inline

Default construct, with invalid vertex labels (-1).

Definition at line 56 of file triFaceI.H.

References FixedList< label, 3 >::FixedList().

Referenced by compare(), labelledTri::labelledTri(), labelledTri::labelledTri(), labelledTri::labelledTri(), labelledTri::labelledTri(), labelledTri::labelledTri(), labelledTri::labelledTri(), labelledTri::labelledTri(), and triFace::hasher::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triFace() [2/6]

triFace ( const label p0,
const label p1,
const label p2 )
inlinenoexcept

Construct from three vertex labels.

Definition at line 62 of file triFaceI.H.

References a(), b, c(), and p0.

Here is the call graph for this function:

◆ triFace() [3/6]

triFace ( std::initializer_list< label > list)
inlineexplicit

Construct from an initializer list of three vertex labels.

Definition at line 75 of file triFaceI.H.

References FixedList< label, 3 >::FixedList().

Here is the call graph for this function:

◆ triFace() [4/6]

triFace ( const labelUList & list)
inlineexplicit

Copy construct from a list of three vertex labels.

Definition at line 81 of file triFaceI.H.

References FixedList< label, 3 >::FixedList().

Here is the call graph for this function:

◆ triFace() [5/6]

triFace ( const labelUList & list,
const FixedList< label, 3 > & indices )
inline

Copy construct from a subset of vertex labels.

Definition at line 87 of file triFaceI.H.

References FixedList< label, 3 >::FixedList().

Here is the call graph for this function:

◆ triFace() [6/6]

triFace ( Istream & is)
inline

Construct from Istream.

Definition at line 97 of file triFaceI.H.

References FixedList< label, 3 >::FixedList().

Here is the call graph for this function:

Member Function Documentation

◆ front()

void front ( )
delete

The front() accessor (from FixedList) has no purpose.

◆ back()

void back ( )
delete

The back() accessor (from FixedList) has no purpose.

References FixedList< label, 3 >::FixedList(), and p0.

Here is the call graph for this function:

◆ a() [1/2]

label a ( ) const
inlinenoexcept

The first vertex.

Definition at line 128 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Referenced by areaNormal(), average(), box(), centre(), compare(), edgeDirection(), edges(), find(), good(), points(), rcEdges(), reverseFace(), tri(), triFace(), and unitNormal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ b() [1/2]

label b ( ) const
inlinenoexcept

The second vertex.

Definition at line 133 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Referenced by average(), compare(), edgeDirection(), and find().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ c() [1/2]

label c ( ) const
inlinenoexcept

The third vertex.

Definition at line 138 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Referenced by areaNormal(), average(), box(), centre(), edgeDirection(), edges(), find(), good(), points(), rcEdges(), reverseFace(), tri(), triFace(), and unitNormal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ a() [2/2]

label & a ( )
inlinenoexcept

The first vertex.

Definition at line 143 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Here is the call graph for this function:

◆ b() [2/2]

label & b ( )
inlinenoexcept

The second vertex.

Definition at line 148 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Here is the call graph for this function:

◆ c() [2/2]

label & c ( )
inlinenoexcept

The third vertex.

Definition at line 153 of file triFace.H.

References FixedList< label, 3 >::get(), and Foam::noexcept.

Here is the call graph for this function:

◆ good()

bool good ( ) const
inlinenoexcept

True if vertices are unique and non-negative.

Definition at line 105 of file triFaceI.H.

References a(), b, c(), and Foam::noexcept.

Referenced by valid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collapse()

Foam::label collapse ( )
inline

'Collapse' face by marking duplicate vertex labels.

Duplicates vertex labels are marked with '-1' (the lower vertex is retained). Return the collapsed size.

Definition at line 116 of file triFaceI.H.

References n, and FixedList< label, 3 >::operator[]().

Here is the call graph for this function:

◆ flip()

void flip ( )
inline

Flip the face in-place.

The starting vertex of the original and flipped face are identical.

Definition at line 143 of file triFaceI.H.

References FixedList< label, 3 >::get().

Here is the call graph for this function:

◆ points()

Foam::pointField points ( const UList< point > & pts) const
inline

Return the points corresponding to this face.

Definition at line 149 of file triFaceI.H.

References a(), b, c(), p, and pts.

Referenced by areaNormal(), box(), centre(), FOAM_DEPRECATED_FOR(), inertia(), intersection(), intersection(), mag(), magSqr(), nearestPoint(), nearestPointClassify(), ray(), sign(), tri(), and unitNormal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triFaceFace()

Foam::face triFaceFace ( ) const
inline

Return triangle as a face.

Definition at line 161 of file triFaceI.H.

◆ tri()

Foam::triPointRef tri ( const UList< point > & points) const
inline

Return the triangle.

Definition at line 167 of file triFaceI.H.

References a(), b, c(), and points().

Referenced by inertia(), intersection(), labelledTri::labelledTri(), nearestPoint(), nearestPointClassify(), ray(), and sign().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ centre()

Foam::point centre ( const UList< point > & points) const
inline

Return centre (centroid).

Definition at line 173 of file triFaceI.H.

References a(), b, c(), triangle< point, const point & >::centre(), and points().

Here is the call graph for this function:

◆ average()

template<class Type>
Type average ( const UList< point > & unused,
const Field< Type > & fld ) const

Calculate average value at centroid of face.

Definition at line 26 of file triFaceTemplates.C.

References a(), b(), c(), and fld().

Here is the call graph for this function:

◆ areaNormal()

Foam::vector areaNormal ( const UList< point > & points) const
inline

The area normal - with magnitude equal to area of face.

Definition at line 179 of file triFaceI.H.

References a(), triangle< point, const point & >::areaNormal(), b, c(), and points().

Referenced by FOAM_DEPRECATED_FOR(), mag(), and magSqr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unitNormal()

Foam::vector unitNormal ( const UList< point > & points) const
inline

The unit normal.

Definition at line 185 of file triFaceI.H.

References a(), b, c(), points(), and triangle< point, const point & >::unitNormal().

Referenced by wallBoundedParticle::trackToEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FOAM_DEPRECATED_FOR()

FOAM_DEPRECATED_FOR ( 2018- 12,
"areaNormal() or unitNormal()"  ) const &
inline

Legacy name for areaNormal().

Deprecated
(2018-06) Deprecated for new use

Definition at line 223 of file triFace.H.

References areaNormal(), FOAM_DEPRECATED_FOR(), and points().

Referenced by FOAM_DEPRECATED_FOR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mag()

Foam::scalar mag ( const UList< point > & points) const
inline

Magnitude of face area.

Definition at line 191 of file triFaceI.H.

References areaNormal(), and points().

Here is the call graph for this function:

◆ magSqr()

Foam::scalar magSqr ( const UList< point > & points) const
inline

Magnitude squared of face area.

Definition at line 197 of file triFaceI.H.

References areaNormal(), and points().

Here is the call graph for this function:

◆ box()

Foam::Pair< Foam::point > box ( const UList< point > & points) const
inline

The enclosing (bounding) box for the face.

Definition at line 204 of file triFaceI.H.

References a(), b, triangle< point, const point & >::box(), c(), and points().

Here is the call graph for this function:

◆ nTriangles()

Foam::label nTriangles ( ) const
inlinenoexcept

Number of triangles after splitting == 1.

Definition at line 210 of file triFaceI.H.

References Foam::noexcept.

◆ reverseFace()

Foam::triFace reverseFace ( ) const
inline

Return face with reverse direction.

The starting vertex of the original and reverse face are identical.

Definition at line 216 of file triFaceI.H.

References a(), b, c(), and triFace().

Here is the call graph for this function:

◆ which()

Foam::label which ( const label vertex) const
inline

Find local vertex on face for the vertex label, same as find().

Returns
position in face (0,1,2) or -1 if not found.

Definition at line 223 of file triFaceI.H.

References FixedList< T, N >::find().

Here is the call graph for this function:

◆ nextLabel()

Foam::label nextLabel ( const label i) const
inline

Next vertex on face.

Definition at line 235 of file triFaceI.H.

References FixedList< label, 3 >::operator[]().

Referenced by edge(), and edge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prevLabel()

Foam::label prevLabel ( const label i) const
inline

Previous vertex on face.

Definition at line 241 of file triFaceI.H.

References FixedList< label, 3 >::operator[]().

Referenced by rcEdge(), and rcEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thisLabel()

Foam::label thisLabel ( const label i) const
inline

The vertex on face - identical to operator[], but with naming similar to nextLabel(), prevLabel().

Definition at line 229 of file triFaceI.H.

References FixedList< label, 3 >::operator[]().

Referenced by edge(), edge(), rcEdge(), and rcEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sweptVol()

Foam::scalar sweptVol ( const UList< point > & opts,
const UList< point > & npts ) const
inline

Return swept-volume from old-points to new-points.

Definition at line 247 of file triFaceI.H.

References FixedList< label, 3 >::operator[]().

Here is the call graph for this function:

◆ inertia()

Foam::tensor inertia ( const UList< point > & points,
const point & refPt = vector::zero,
scalar density = 1.0 ) const
inline

Return the inertia tensor, with optional reference.

point and density specification

Definition at line 280 of file triFaceI.H.

References points(), and tri().

Here is the call graph for this function:

◆ ray()

Foam::pointHit ray ( const point & p,
const vector & q,
const UList< point > & points,
const intersection::algorithm alg = intersection::FULL_RAY,
const intersection::direction dir = intersection::VECTOR ) const
inline

Return point intersection with a ray starting at p, in direction q.

Definition at line 292 of file triFaceI.H.

References p, points(), and tri().

Here is the call graph for this function:

◆ intersection() [1/2]

Foam::pointHit intersection ( const point & p,
const vector & q,
const UList< point > & points,
const intersection::algorithm alg,
const scalar tol = 0.0 ) const
inline

Fast intersection with a ray.

Definition at line 306 of file triFaceI.H.

References p, points(), and tri().

Referenced by intersection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intersection() [2/2]

Foam::pointHit intersection ( const point & p,
const vector & q,
const point & ctr,
const UList< point > & points,
const intersection::algorithm alg,
const scalar tol = 0.0 ) const
inline

Definition at line 319 of file triFaceI.H.

References intersection(), p, and points().

Here is the call graph for this function:

◆ nearestPoint()

Foam::pointHit nearestPoint ( const point & p,
const UList< point > & points ) const
inline

Return nearest point to face.

Definition at line 333 of file triFaceI.H.

References p, points(), and tri().

Here is the call graph for this function:

◆ nearestPointClassify()

Foam::pointHit nearestPointClassify ( const point & p,
const UList< point > & points,
label & nearType,
label & nearLabel ) const
inline

Return nearest point to face and classify it:

+ near point (nearType=POINT, nearLabel=0, 1, 2) + near edge (nearType=EDGE, nearLabel=0, 1, 2) Note: edges are counted from starting vertex so e.g. edge n is from f[n] to f[0], where the face has n + 1 points

Definition at line 343 of file triFaceI.H.

References p, points(), and tri().

Here is the call graph for this function:

◆ sign()

int sign ( const point & p,
const UList< point > & points,
const scalar tol = SMALL ) const
inline

The sign for which side of the face plane the point is on.

Uses the supplied tolerance for rounding around zero.

Returns
  • 0: on plane
  • +1: front-side
  • -1: back-side

Definition at line 355 of file triFaceI.H.

References p, points(), and tri().

Here is the call graph for this function:

◆ nEdges()

Foam::label nEdges ( ) const
inlinenoexcept

Return number of edges == 3.

Definition at line 366 of file triFaceI.H.

References Foam::noexcept.

◆ edge() [1/2]

Foam::edge edge ( const label edgei) const
inline

Return i-th face edge (forward walk order).

The edge 0 is from [0] to [1] and edge 1 is from [1] to [2]

Definition at line 372 of file triFaceI.H.

References nextLabel(), and thisLabel().

Referenced by faceEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ edge() [2/2]

Foam::vector edge ( const label edgei,
const UList< point > & pts ) const
inline

Return vector of i-th face edge (forward walk order).

The edge 0 is from [0] to [1] and edge 1 is from [1] to [2]

Definition at line 378 of file triFaceI.H.

References nextLabel(), pts, and thisLabel().

Here is the call graph for this function:

◆ rcEdge() [1/2]

Foam::edge rcEdge ( const label edgei) const
inline

Return i-th face edge in reverse walk order.

The rcEdge 0 is from [0] to [n-1] and rcEdge 1 is from [n-1] to [n-2]

Definition at line 388 of file triFaceI.H.

References prevLabel(), and thisLabel().

Here is the call graph for this function:

◆ rcEdge() [2/2]

Foam::vector rcEdge ( const label edgei,
const UList< point > & pts ) const
inline

Return vector of i-th face edge in reverse walk order.

The rcEdge 0 is from [0] to [n-1] and rcEdge 1 is from [n-1] to [n-2]

Definition at line 397 of file triFaceI.H.

References prevLabel(), pts, and thisLabel().

Here is the call graph for this function:

◆ edges()

Foam::edgeList edges ( ) const
inline

Return list of edges in forward walk order.

The edge 0 is from [0] to [1] and edge 1 is from [1] to [2]

Definition at line 410 of file triFaceI.H.

References a(), b, c(), and UList< T >::first().

Here is the call graph for this function:

◆ rcEdges()

Foam::edgeList rcEdges ( ) const
inline

Return list of edges in reverse walk order.

The rcEdge 0 is from [0] to [n-1] and rcEdge 1 is from [n-1] to [n-2]

Definition at line 427 of file triFaceI.H.

References a(), b, c(), and UList< T >::first().

Here is the call graph for this function:

◆ contains()

bool contains ( const Foam::edge & e) const
inline

True if face contains(edge).

Definition at line 488 of file triFaceI.H.

References e, and edgeDirection().

Here is the call graph for this function:

◆ find()

Foam::label find ( const Foam::edge & e) const
inline

Find the edge within the face.

Returns
the edge index or -1 if not found

Definition at line 466 of file triFaceI.H.

References a(), b(), c(), and e.

Here is the call graph for this function:

◆ edgeDirection()

int edgeDirection ( const Foam::edge & e) const
inline

Test the edge direction on the face.

Returns
  • +1: forward (counter-clockwise) on the face
  • -1: reverse (clockwise) on the face
  • 0: edge not found on the face

Definition at line 444 of file triFaceI.H.

References a(), b(), c(), and e.

Referenced by contains().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare()

int compare ( const triFace & a,
const triFace & b )
inlinestatic

Compare triFaces.

Returns
:
  • 0: different
  • +1: identical
  • -1: same face, but different orientation

Definition at line 27 of file triFaceI.H.

References a(), b(), and triFace().

Referenced by Foam::operator!=(), and Foam::operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=()

void operator+= ( const label vertexOffset)
inline

Increment (offset) vertices by given amount.

Definition at line 497 of file triFaceI.H.

◆ hash_code()

unsigned hash_code ( unsigned seed = 0) const
inline

The (commutative) hash value for triFace.

Definition at line 489 of file triFace.H.

References hash_code().

Referenced by hash_code(), and triFace::hasher::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

bool valid ( ) const
inlinenoexcept

Same as good().

Definition at line 529 of file triFace.H.

References good(), and Foam::noexcept.

Here is the call graph for this function:

◆ faceEdge()

Foam::edge faceEdge ( label edgei) const
inline

Identical to edge().

Definition at line 534 of file triFace.H.

References edge().

Here is the call graph for this function:

The documentation for this class was generated from the following files: