Files Classes Functions Hierarchy
#include <simplexD1linked.h>
Public Member Functions | |
| simplexD1linked () | |
| Default Constructor: all fields set to 0. | |
| simplexD1linked (INDX const a, INDX const b, INDX const na=0, INDX const nb=0) | |
| Construct a line. | |
| void | construct (INDX const a, INDX const b, INDX const na=0, INDX const nb=0) |
| Construct this line. | |
| void | togglelinedirection () |
| Swap the line direction. | |
| INDX const | piInverse (INDX const gpt) const |
| Get the local point index. | |
| boolc | isonboundary () const |
| Does the line have end points? | |
| void | setnull () |
| Set all fields to 0. | |
| boolc | isnull () const |
| Are all the fields set to zero? | |
| operator stringc () const | |
| Serialize this object. | |
| void | serializeInverse (stringc &s) |
| Read in/construct an object. | |
Public Attributes | |
| INDX | pi [2] |
| Indexes to points or verticies. | |
| INDX | ni [2] |
| Indexes to neighboring simplexes. | |
The neighbor link is defined : given neighbor k, the point opposite and hence not in contact with the neighboring simplex k has a local index which is the index to neigbor k.
This definition was choosen because it generalized to simplexes in any dimension, and is useful in algorithms. ie piInverse.
Definition at line 23 of file simplexD1linked.h.
| simplexD1linked< INDX >::simplexD1linked | ( | ) | [inline] |
| simplexD1linked< INDX >::simplexD1linked | ( | INDX const | a, | |
| INDX const | b, | |||
| INDX const | na = 0, |
|||
| INDX const | nb = 0 | |||
| ) | [inline] |
| void simplexD1linked< INDX >::construct | ( | INDX const | a, | |
| INDX const | b, | |||
| INDX const | na = 0, |
|||
| INDX const | nb = 0 | |||
| ) | [inline] |
| boolc simplexD1linked< INDX >::isnull | ( | ) | const [inline] |
Are all the fields set to zero?
Definition at line 85 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni, and simplexD1linked< INDX >::pi.
00086 { 00087 if (pi[0]!=0) return false; 00088 if (pi[1]!=0) return false; 00089 if (ni[0]!=0) return false; 00090 if (ni[1]!=0) return false; 00091 return true; 00092 }
| boolc simplexD1linked< INDX >::isonboundary | ( | ) | const [inline] |
Does the line have end points?
Definition at line 73 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni.
00074 { 00075 if (ni[0]==0) return true; 00076 if (ni[1]==0) return true; 00077 return false; 00078 }
| simplexD1linked< INDX >::operator stringc | ( | ) | const [inline] |
Serialize this object.
Definition at line 113 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni, and simplexD1linked< INDX >::pi.
00114 { 00115 stringstream ss; 00116 ss << pi[0] << " " << pi[1] << " " << ni[0] << " " << ni[1]; 00117 return ss.str(); 00118 }
| INDX const simplexD1linked< INDX >::piInverse | ( | INDX const | gpt | ) | const [inline] |
Get the local point index.
Definition at line 61 of file simplexD1linked.h.
References simplexD1linked< INDX >::pi.
00062 { 00063 assert(gpt!=0); 00064 00065 if (pi[0]==gpt) return 0; 00066 if (pi[1]==gpt) return 1; 00067 00068 assert(false); 00069 return 3; // Return crap. 00070 }
| void simplexD1linked< INDX >::serializeInverse | ( | stringc & | s | ) | [inline] |
Read in/construct an object.
Definition at line 98 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni, and simplexD1linked< INDX >::pi.
Referenced by simplexD1linkedtest::test01().
00099 { 00100 stringstream w(s); 00101 w >> pi[0]; 00102 w >> pi[1]; 00103 w >> ni[0]; 00104 w >> ni[1]; 00105 }
| void simplexD1linked< INDX >::setnull | ( | ) | [inline] |
Set all fields to 0.
Definition at line 81 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni, and simplexD1linked< INDX >::pi.
| void simplexD1linked< INDX >::togglelinedirection | ( | ) | [inline] |
Swap the line direction.
Definition at line 48 of file simplexD1linked.h.
References simplexD1linked< INDX >::ni, and simplexD1linked< INDX >::pi.
00049 { 00050 INDX p0 = pi[0]; 00051 INDX n0 = ni[0]; 00052 pi[0] = pi[1]; 00053 ni[0] = ni[1]; 00054 pi[1] = p0; 00055 ni[1] = n0; 00056 }
| INDX simplexD1linked< INDX >::ni[2] |
Indexes to neighboring simplexes.
If ni[k] is 0 this is a boundary/endpoint.
Definition at line 31 of file simplexD1linked.h.
Referenced by simplexD1linked< INDX >::isnull(), simplexD1linked< INDX >::isonboundary(), simplexD1linked< INDX >::operator stringc(), simplexD1linked< INDX >::serializeInverse(), simplexD1linked< INDX >::setnull(), and simplexD1linked< INDX >::togglelinedirection().
| INDX simplexD1linked< INDX >::pi[2] |
Indexes to points or verticies.
Definition at line 28 of file simplexD1linked.h.
Referenced by simplexD1linked< INDX >::isnull(), simplexD1linked< INDX >::operator stringc(), simplexD1linked< INDX >::piInverse(), simplexD1linked< INDX >::serializeInverse(), simplexD1linked< INDX >::setnull(), and simplexD1linked< INDX >::togglelinedirection().
1.5.8