Open PaperOpt
OpenPaperOpt/SurfaceTopography.h
Go to the documentation of this file.
00001 #ifndef _SurfaceTopography_H_
00002 #define _SurfaceTopography_H_
00003 
00004 #include "Surface.h"
00005 #include "Array2D.h"
00006 
00016 class SurfaceTopography : public Surface {
00017 
00018 public:
00019         SurfaceTopography(){};
00020 
00031         SurfaceTopography(float _zoffset, Array2D<float>& z,float sizeX, float sizeY,
00032                 Array2D< V2<float> >& v,StructureObject* _el);
00033 
00044         SurfaceTopography(float _zoffset, float _rms_lo, float _rms_hi,
00045                 Array2D<float>& z,float sizeX, float sizeY,StructureObject* _el);
00046 
00050         virtual ~SurfaceTopography();
00051 
00065         int mIntercept(WavePacket& wp, double t1, double t2,int updown, double& t) const;
00066 
00081         int Process(WavePacket& wp, int up_down, int internal) const;
00082 
00089         double mZposition(WavePacket &wp) const;
00090 
00091  protected:
00109         bool CellIntercept(WavePacket& wp, int x1, int y1, double& t,double t_c1, double t_c2) const;
00119         bool UnicellIntercept(WavePacket &wp, double& t,double t1, double t2) const;
00120 
00124         V2<float> GetRoughness(WavePacket& wp) const;
00125         
00129     vector<float>  mXvector;  
00133     vector<float>  mYvector;
00134   
00138     Array2D<float>* mZmatrixHeight;
00143     Array2D< V2<float> >* mRoughnessMap ;
00144 
00148     Array2D<float>* mZminCellMatrix;    
00149 
00153         Array2D<float>* mZmaxCellMatrix;
00154 
00159         Array2D< V3<double> >* mNormalsLl;
00160 
00165         Array2D< V3<double> >* mNormalsUr;      
00166 
00171         Array2D<float>* mPlaneOffsetLl;
00172         Array2D<float>* mPlaneOffsetUr;
00173 
00177         float mDx, mDy;                                         
00178 
00182     int mNumberGridPointsX, mNumberGridPointsY;                                                         
00183         
00187         double mDxRough, mDyRough;      
00188         
00193         bool mDetailedRoughness;        
00194 };
00195 #endif