Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef _GMTL_COMPARITORS_H_
00007 #define _GMTL_COMPARITORS_H_
00008
00009
00010
00011
00012
00013
00014
00015 #include <gmtl/Vec3.h>
00016 #include <gmtl/Point3.h>
00017
00018 namespace gmtl
00019 {
00020
00021
00022 struct CompareIndexPointProjections
00023 {
00024 public:
00025 CompareIndexPointProjections() : points(NULL)
00026 {;}
00027
00028 bool operator()(const unsigned x, const unsigned y)
00029 {
00030 float xVal = sortDir.dot((*points)[x]);
00031 float yVal = sortDir.dot((*points)[y]);
00032
00033 return (xVal < yVal);
00034 }
00035
00036 const std::vector<Point3>* points;
00037 gmtl::Vec3 sortDir;
00038 };
00039 };
00040
00041 #endif
00042