Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
bamg::AdjacentTriangle Class Reference

#include <AdjacentTriangle.h>

Public Member Functions

 AdjacentTriangle ()
 
 AdjacentTriangle (Triangle *tt, int aa)
 
 operator Triangle * () const
 
 operator Triangle & () const
 
 operator int () const
 
AdjacentTriangleoperator++ ()
 
AdjacentTriangle operator-- ()
 
int Locked () const
 
int GetAllFlag_UnSwap () const
 
void SetLock ()
 
void SetAdj2 (const AdjacentTriangle &ta, int l=0)
 
int swap ()
 
AdjacentTriangle Adj () const
 
BamgVertexEdgeVertex (const int &i) const
 
long long & det () const
 

Data Fields

Trianglet
 
int a
 

Detailed Description

Definition at line 12 of file AdjacentTriangle.h.

Constructor & Destructor Documentation

◆ AdjacentTriangle() [1/2]

bamg::AdjacentTriangle::AdjacentTriangle ( )
inline

Definition at line 19 of file AdjacentTriangle.h.

19 :a(0),t(NULL) {};

◆ AdjacentTriangle() [2/2]

bamg::AdjacentTriangle::AdjacentTriangle ( Triangle tt,
int  aa 
)
inline

Definition at line 20 of file AdjacentTriangle.h.

20 : t(tt),a(aa &3) {};

Member Function Documentation

◆ operator Triangle *()

bamg::AdjacentTriangle::operator Triangle * ( ) const
inline

Definition at line 23 of file AdjacentTriangle.h.

23 {return t;}

◆ operator Triangle &()

bamg::AdjacentTriangle::operator Triangle & ( ) const
inline

Definition at line 24 of file AdjacentTriangle.h.

24 {return *t;}

◆ operator int()

bamg::AdjacentTriangle::operator int ( ) const
inline

Definition at line 25 of file AdjacentTriangle.h.

25 {return a;}

◆ operator++()

AdjacentTriangle& bamg::AdjacentTriangle::operator++ ( )
inline

Definition at line 26 of file AdjacentTriangle.h.

26 { a= NextEdge[a]; return *this; }

◆ operator--()

AdjacentTriangle bamg::AdjacentTriangle::operator-- ( )
inline

Definition at line 27 of file AdjacentTriangle.h.

27 { a= PreviousEdge[a]; return *this; }

◆ Locked()

int bamg::AdjacentTriangle::Locked ( ) const

Definition at line 15 of file AdjacentTriangle.cpp.

15  {/*{{{*/
16  return t->AdjEdgeIndex[a] & 4;
17  }

◆ GetAllFlag_UnSwap()

int bamg::AdjacentTriangle::GetAllFlag_UnSwap ( ) const

Definition at line 19 of file AdjacentTriangle.cpp.

19  {/*{{{*/
20  // take all flag except MarkUnSwap
21  return t->AdjEdgeIndex[a] & 1012;
22  }

◆ SetLock()

void bamg::AdjacentTriangle::SetLock ( )

Definition at line 24 of file AdjacentTriangle.cpp.

24  {/*{{{*/
25  t->SetLocked(a);
26  }

◆ SetAdj2()

void bamg::AdjacentTriangle::SetAdj2 ( const AdjacentTriangle ta,
int  l = 0 
)

Definition at line 44 of file AdjacentTriangle.cpp.

44  {/*{{{*/
45  //set Adjacent Triangle of a triangle
46  if(t) {
47  t->adj[a]=ta.t;
48  t->AdjEdgeIndex[a]=ta.a|l;
49  }
50  if(ta.t) {
51  ta.t->adj[ta.a] = t ;
52  ta.t->AdjEdgeIndex[ta.a] = a| l ;
53  }
54  }

◆ swap()

int bamg::AdjacentTriangle::swap ( )

Definition at line 40 of file AdjacentTriangle.cpp.

40  {/*{{{*/
41  return t->swap(a);
42  }

◆ Adj()

AdjacentTriangle bamg::AdjacentTriangle::Adj ( ) const

Definition at line 28 of file AdjacentTriangle.cpp.

28  {/*{{{*/
29  return t->Adj(a);
30  }

◆ EdgeVertex()

BamgVertex * bamg::AdjacentTriangle::EdgeVertex ( const int &  i) const

Definition at line 32 of file AdjacentTriangle.cpp.

32  {/*{{{*/
33  return t->vertices[VerticesOfTriangularEdge[a][i]];
34  }

◆ det()

long long & bamg::AdjacentTriangle::det ( ) const

Definition at line 36 of file AdjacentTriangle.cpp.

36  {/*{{{*/
37  return t->det;
38  }

Field Documentation

◆ t

Triangle* bamg::AdjacentTriangle::t

Definition at line 15 of file AdjacentTriangle.h.

◆ a

int bamg::AdjacentTriangle::a

Definition at line 16 of file AdjacentTriangle.h.


The documentation for this class was generated from the following files:
bamg::AdjacentTriangle::a
int a
Definition: AdjacentTriangle.h:16
bamg::PreviousEdge
static const short PreviousEdge[3]
Definition: macros.h:18
bamg::Triangle::Adj
AdjacentTriangle Adj(int i) const
Definition: Triangle.cpp:48
bamg::Triangle::swap
int swap(short a1, int=0)
Definition: Triangle.cpp:226
bamg::Triangle::vertices
BamgVertex * vertices[3]
Definition: Triangle.h:18
bamg::Triangle::SetLocked
void SetLocked(int a)
Definition: Triangle.cpp:202
bamg::AdjacentTriangle::t
Triangle * t
Definition: AdjacentTriangle.h:15
bamg::Triangle::adj
Triangle * adj[3]
Definition: Triangle.h:19
bamg::Triangle::det
long long det
Definition: Triangle.h:23
bamg::VerticesOfTriangularEdge
static const short VerticesOfTriangularEdge[3][2]
Definition: macros.h:13
bamg::Triangle::AdjEdgeIndex
short AdjEdgeIndex[3]
Definition: Triangle.h:20
bamg::NextEdge
static const short NextEdge[3]
Definition: macros.h:17