proj home

Files   Classes   Functions   Hierarchy  

simplexD2indexed< INDX > Class Template Reference

Indexed triangle. More...

#include <simplexD2indexed.h>

Collaboration diagram for simplexD2indexed< INDX >:

List of all members.

Public Member Functions

 simplexD2indexed ()
 Construct a null triangle.
 simplexD2indexed (INDX const a, INDX const b, INDX const c)
 Construct a triangle.
boolc operator== (simplexD2indexed< INDX > const &t) const
 Are two triangles the same?
void setnull ()
 Set all fields to 0.
boolc isnull () const
 Is this a triangle? Are all the fields set to zero?
ostreamprint (ostream &os) const
 Global << calls this.
 operator stringc () const
 Serialize this object.

Public Attributes

INDX pi [3]
 Indexes to points or vertexes.


Detailed Description

template<typename INDX = uint>
class simplexD2indexed< INDX >

Indexed triangle.

The indexes refer to points. These may or may not be ordered depending on the application.

Definition at line 16 of file simplexD2indexed.h.


Constructor & Destructor Documentation

template<typename INDX = uint>
simplexD2indexed< INDX >::simplexD2indexed (  )  [inline]

Construct a null triangle.

Definition at line 24 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00025     { pi[0] = pi[1] = pi[2] = 0; }

template<typename INDX = uint>
simplexD2indexed< INDX >::simplexD2indexed ( INDX const   a,
INDX const   b,
INDX const   c 
) [inline]

Construct a triangle.

Definition at line 27 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00028     { pi[0]=a; pi[1]=b; pi[2]=c; }


Member Function Documentation

template<typename INDX >
boolc simplexD2indexed< INDX >::isnull (  )  const [inline]

Is this a triangle? Are all the fields set to zero?

Definition at line 76 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00077 {
00078 //  I have commented this out but I have no idea why I wrote this code.
00079 //  It is here in case something breaks as continuous integration(the death star)
00080 //  is not operational.
00081 /*
00082   if (pi[0]==0)
00083     return true;
00084 
00085   if (pi[1]==0)
00086     return true;
00087 
00088   if (pi[2]==0)
00089     return true;
00090 
00091   return false;
00092 */
00093 
00094   if (pi[0]!=0)
00095     return false;
00096 
00097   if (pi[1]!=0)
00098     return false;
00099 
00100   if (pi[2]!=0)
00101     return false;
00102 
00103   return true;
00104 }

template<typename INDX >
simplexD2indexed< INDX >::operator stringc (  )  const [inline]

Serialize this object.

Definition at line 55 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00056 {
00057   stringstream ss;
00058   ss << pi[0] << " " << pi[1] << " " << pi[2];
00059   return ss.str();
00060 }

template<typename INDX >
boolc simplexD2indexed< INDX >::operator== ( simplexD2indexed< INDX > const &  t  )  const [inline]

Are two triangles the same?

Definition at line 64 of file simplexD2indexed.h.

References sequencesequal3().

00067 {
00068 //  for (uint k=0; k<3; ++k)
00069 //    if (((pi[k]==t.pi[0])||(pi[k]==t.pi[1])||(pi[k]==t.pi[2]))==false)
00070 //      return false;
00071 
00072   return sequencesequal3(pi,t.pi);
00073 }

template<typename INDX = uint>
ostream& simplexD2indexed< INDX >::print ( ostream os  )  const [inline]

Global << calls this.

Definition at line 40 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00041     { return os << pi[0] << " " << pi[1] << " " << pi[2]; }

template<typename INDX = uint>
void simplexD2indexed< INDX >::setnull (  )  [inline]

Set all fields to 0.

Definition at line 34 of file simplexD2indexed.h.

References simplexD2indexed< INDX >::pi.

00035     { pi[0] = pi[1] = pi[2] = 0; }


Member Data Documentation

template<typename INDX = uint>
INDX simplexD2indexed< INDX >::pi[3]


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

Generated on Fri Mar 4 00:50:17 2011 for Chelton Evans Source by  doxygen 1.5.8