NanoShaper  0.7.2
NanoShaper is a tool able to triangulate and inspect an arbitray triangulated surface or several types of molecular surfaces
C:/Documents and Settings/sdecherchi/My Documents/Ricerca/software nostro/NanoShaper0.7/src/FVanDerWaalsSurface.h
Go to the documentation of this file.
00001 //---------------------------------------------------------
00005 //---------------------------------------------------------
00006 
00007 #ifndef FVanDerWaalsSurface_h
00008 #define FVanDerWaalsSurface_h
00009 
00010 #include "Surface.h"
00011 #include "SurfaceFactory.h"
00012 
00013 #ifdef DBGMEM_CRT
00014         #define _CRTDBG_MAP_ALLOC
00015         #define _CRTDBG_MAP_ALLOC_NEW
00016 #endif
00017 
00029 class FVanDerWaalsSurface: public Surface
00030 {
00031 
00032 
00033 private:
00034 
00035         bool savePovRay;
00036 
00037 public:
00039         FVanDerWaalsSurface();
00041         FVanDerWaalsSurface(DelPhiShared* ds);
00043         FVanDerWaalsSurface(ConfigFile* cf,DelPhiShared* ds);
00044 
00046 
00047         virtual bool build();
00049         virtual bool save(char* fileName);
00051         virtual bool load(char* fileName);
00053         virtual void printSummary();
00055         virtual bool getProjection(double p[3],double* proj1,double* proj2,
00056                 double* proj3,double* normal1,double* normal2,double* normal3);
00058         virtual void getRayIntersection(double p1[3],double p2[3],vector<pair<double,double*> >& intersections,int thdID,bool computeNormals);
00060         virtual void init();
00062         virtual void init(ConfigFile* cf);
00064         virtual void clear();
00066         virtual void preProcessPanel();
00068         virtual void postRayCasting();
00069         virtual bool preBoundaryProjection();
00071 
00072         void setSavePovRay(bool ss) 
00073         { 
00074                 savePovRay = ss;
00075         }
00076         
00077         bool getSavePovRay() 
00078         {
00079                 return savePovRay;
00080         }
00081 
00082         
00083         virtual ~FVanDerWaalsSurface();
00084 
00085 private:
00086 
00088         void saveSphere(ostream& of,double* center,double radius);
00090         void painter(int start,int end);
00091         
00092 };
00093 
00094 //REGISTER_SURFACE(FVanDerWaalsSurface,"fvdw")
00095 /*
00096 static class FVanDerWaalsSurfaceRegister{ 
00097         static Surface* createSurface(ConfigFile* conf,DelPhiShared* ds) 
00098         { 
00099                 return new FVanDerWaalsSurface(conf,ds); 
00100         } 
00101         public: 
00102                 FVanDerWaalsSurfaceRegister() 
00103                 { 
00104                         surfaceFactory().add("fvdw",createSurface); 
00105                 } 
00106 } FVanDerWaalsSurfaceRegisterObject;
00107 */
00108 
00109 static SurfaceRecorder<FVanDerWaalsSurface> fvdwRecorder("fvdw");
00110 
00111 #endif