OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

triFace Class Reference

A triangle face primitive using a FixedList. More...

Inheritance diagram for triFace:
Collaboration diagram for triFace:

List of all members.


Public Member Functions

 triFace ()
 Construct null.
 triFace (const label a, const label b, const label c)
 Construct from three point labels.
 triFace (const UList< label > &)
 Construct from a UList<label>.
 triFace (Istream &)
 Construct from Istream.
label collapse ()
 Collapse face by removing duplicate point labels.
int edgeDirection (const edge &) const
 Return the edge direction on the face.
pointField points (const pointField &points) const
 Return the points corresponding to this face.
face triFaceFace () const
 Return triangle as a face.
label nEdges () const
 Return number of edges.
edgeList edges () const
 Return edges.
point centre (const pointField &) const
 Return centre (centroid).
scalar mag (const pointField &) const
 Return scalar magnitude.
vector normal (const pointField &) const
 Return vector normal.
label nTriangles () const
 Number of triangles after splitting.
triFace reverseFace () const
 Return face with reverse direction.
scalar sweptVol (const pointField &oldPoints, const pointField &newPoints) const
 Return swept-volume.
pointHit ray (const point &p, const vector &q, const pointField &points, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Return point intersection with a ray starting at p, with.
triPointRef tri (const pointField &) const
 Return the triangle.

Static Public Member Functions

static int compare (const triFace &, const triFace &)
 compare triFaces

Friends

bool operator== (const triFace &, const triFace &)
bool operator!= (const triFace &, const triFace &)

Detailed Description

A triangle face primitive using a FixedList.

Source files

Definition at line 58 of file triFace.H.


Constructor & Destructor Documentation

triFace (  )  [inline]

Construct null.

Definition at line 55 of file triFaceI.H.

Referenced by triFace::sweptVol().

Here is the caller graph for this function:

triFace ( const label  a,
const label  b,
const label  c 
) [inline]

Construct from three point labels.

Definition at line 60 of file triFaceI.H.

triFace ( const UList< label > &  lst  )  [inline, explicit]

Construct from a UList<label>.

Definition at line 72 of file triFaceI.H.

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

Here is the call graph for this function:

triFace ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 78 of file triFaceI.H.


Member Function Documentation

Foam::label collapse (  )  [inline]

Collapse face by removing duplicate point labels.

return the collapsed size, set collapsed point labels to -1

Definition at line 86 of file triFaceI.H.

int edgeDirection ( const edge &  e  )  const [inline]

Return the edge direction on the face.

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

Definition at line 164 of file triFaceI.H.

Foam::pointField points ( const pointField &  points  )  const [inline]

Return the points corresponding to this face.

Definition at line 113 of file triFaceI.H.

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

Here is the call graph for this function:

Foam::face triFaceFace (  )  const [inline]

Return triangle as a face.

Definition at line 125 of file triFaceI.H.

Foam::label nEdges (  )  const [inline]

Return number of edges.

Definition at line 137 of file triFaceI.H.

Foam::edgeList edges (  )  const [inline]

Return edges.

Definition at line 143 of file triFaceI.H.

Foam::point centre ( const pointField &  points  )  const [inline]

Return centre (centroid).

Definition at line 191 of file triFaceI.H.

Foam::scalar mag ( const pointField &  points  )  const [inline]

Return scalar magnitude.

Definition at line 202 of file triFaceI.H.

Foam::vector normal ( const pointField &  points  )  const [inline]

Return vector normal.

Definition at line 208 of file triFaceI.H.

Foam::label nTriangles (  )  const [inline]

Number of triangles after splitting.

Definition at line 218 of file triFaceI.H.

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

Here is the call graph for this function:

Foam::triFace reverseFace (  )  const [inline]

Return face with reverse direction.

Definition at line 224 of file triFaceI.H.

Foam::scalar sweptVol ( const pointField &  oldPoints,
const pointField &  newPoints 
) const [inline]

Return swept-volume.

Definition at line 232 of file triFaceI.H.

References triFace::triFace().

Here is the call graph for this function:

Foam::pointHit ray ( const point &  p,
const vector &  q,
const pointField &  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, with.

direction n.

Definition at line 265 of file triFaceI.H.

Foam::triPointRef tri ( const pointField &  points  )  const [inline]

Return the triangle.

Definition at line 282 of file triFaceI.H.

int compare ( const triFace &  a,
const triFace &  b 
) [inline, static]

compare triFaces

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

Definition at line 24 of file triFaceI.H.

Referenced by Foam::operator!=().

Here is the caller graph for this function:


Friends And Related Function Documentation

bool operator== ( const triFace &  ,
const triFace &   
) [friend]

bool operator!= ( const triFace &  ,
const triFace &   
) [friend]


The documentation for this class was generated from the following files:
  • src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
  • src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H
Copyright © 2000-2009 OpenCFD Ltd