proj home

Files   Classes   Functions   Hierarchy  

func2dovervec3d.h

Go to the documentation of this file.
00001 #ifndef FUNC2DOVERVEC3D_H
00002 #define FUNC2DOVERVEC3D_H
00003 
00004 #include <typedefs.h>
00005 
00017 template< typename T >
00018 class func2Dovervec3D
00019 {
00020 public:
00021 
00023   T * const pt;
00025   uintc size;
00026 
00028   func2Dovervec3D(T* pt_, uintc size_)
00029     : pt(pt_), size(size_) {}
00030 
00032   template< typename F >
00033   void evalX( F & fn)
00034   {
00035     for (uint i=0; i<size; ++i)
00036       fn(pt[i].x,pt[i].y,pt[i].z);
00037   }
00038 
00040   template< typename F >
00041   void evalY( F & fn)
00042   {
00043     for (uint i=0; i<size; ++i)
00044       fn(pt[i].y,pt[i].x,pt[i].z);
00045   }
00046 
00048   template< typename F >
00049   void evalZ( F & fn)
00050   {
00051     for (uint i=0; i<size; ++i)
00052       fn(pt[i].z,pt[i].x,pt[i].y);
00053   }
00054 
00055 };
00056 
00057 
00058 
00059 #endif
00060 
00061 

Generated on Fri Mar 4 00:49:28 2011 for Chelton Evans Source by  doxygen 1.5.8