00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00042 #ifndef CUDAQUICKSURF_H
00043 #define CUDAQUICKSURF_H
00044 
00045 class VMDDisplayList;
00046 
00047 class CUDAQuickSurf {
00048   void *voidgpu; 
00049 
00050 public:
00051   enum VolTexFormat { RGB3F, RGB4U }; 
00052  
00053   CUDAQuickSurf(void);
00054   ~CUDAQuickSurf(void);
00055 
00056   int calc_surf(long int natoms, const float *xyzr, const float *colors,
00057                 int colorperatom, VolTexFormat vtexformat,
00058                 float *origin, int* numvoxels, float maxrad,
00059                 float radscale, float gridspacing,
00060                 float isovalue, float gausslim,
00061                 VMDDisplayList *cmdList);
00062 
00063 private:
00064   int free_bufs(void);
00065 
00066   int check_bufs(long int natoms, int colorperatom,
00067                  VolTexFormat vtexformat,
00068                  int acx, int acy, int acz,
00069                  int gx, int gy, int gz);
00070 
00071   int alloc_bufs(long int natoms, int colorperatom, 
00072                  VolTexFormat vtexformat,
00073                  int acx, int acy, int acz,
00074                  int gx, int gy, int gz);
00075 
00076   int get_chunk_bufs(int testexisting,
00077                      long int natoms, int colorperatom, 
00078                      VolTexFormat vtexformat,
00079                      int acx, int acy, int acz,
00080                      int gx, int gy, int gz,
00081                      int &cx, int &cy, int &cz,
00082                      int &sx, int &sy, int &sz);
00083 
00084 
00085 };
00086 
00087 #endif
00088