Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

PointComparator Class Reference

List of all members.

Public Member Functions

bool operator() (const Vertex &a, const Vertex &b) const
 PointComparator ()

Private Attributes

int ignore

Constructor & Destructor Documentation

PointComparator::PointComparator  )  [inline]
 

Definition at line 114 of file cmodfix.cpp.

00115     {
00116     }


Member Function Documentation

bool PointComparator::operator() const Vertex a,
const Vertex b
const [inline]
 

Definition at line 118 of file cmodfix.cpp.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00119     {
00120         const Point3f* p0 = reinterpret_cast<const Point3f*>(a.attributes);
00121         const Point3f* p1 = reinterpret_cast<const Point3f*>(b.attributes);
00122 
00123         if (p0->x < p1->x)
00124         {
00125             return true;
00126         }
00127         else if (p0->x > p1->x)
00128         {
00129             return false;
00130         }
00131         else
00132         {
00133             if (p0->y < p1->y)
00134                 return true;
00135             else if (p0->y > p1->y)
00136                 return false;
00137             else
00138                 return p0->z < p1->z;
00139         }
00140     }


Member Data Documentation

int PointComparator::ignore [private]
 

Definition at line 143 of file cmodfix.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:31 2006 for Celestia by  doxygen 1.4.1