Molecular Vis
Improving perception of molecular visualization
SESSurface.h
1 #pragma once
2 #include <memory>
3 
4 #include <glm/glm.hpp>
5 
6 #include "Molecule.h"
7 #include "../Texture/VolumetricTexture.h"
8 #include "../Shader/Shader.h"
9 #include "../Shader/SSBO.h"
10 
15 struct GridCell
16 {
18  unsigned int count;
19 
21  unsigned int ids[31];
22 };
23 
31 {
32 private:
33  //Compute Shaders
34  const static int MAX_ATOMS;
35  Shader gridBuilder = Shader("compute_grid.glsl");
36  Shader probeIntersection = Shader("probe_intersection.glsl");
37  Shader dfRefinement = Shader("df_refinement.glsl");
38  Shader dfInner = Shader("df_inner.glsl");
39  SSBO<Atom> atomSSBO = SSBO<Atom>(MAX_ATOMS);
40 
41  float probeRadius;
42  float texResolution;
43  // Volumetric Texture
44  glm::vec3 tex_min;
45  glm::vec3 tex_max;
46  glm::uvec3 nrSESVoxel;
47  VolumetricTexture* SESTexture;
48  VolumetricTexture* voxelClassification;
49 
50  // Atom Grid
51  glm::vec3 grid_min;
52  glm::vec3 grid_max;
53  glm::uvec3 nrCells;
54  SSBO<GridCell>* atomGrid;
55 
56  float calculateIdealResolution(const Molecule& molecule);
57  void setupGrids(const Molecule& molecule);
58 
59 
60 public:
67  SESSurface(const Molecule& molecule, float probeRadius);
68  ~SESSurface();
69 
75  void bindToUnit(int unit);
76 
82  glm::vec3 getTexMin();
83 
89  glm::vec3 getTexMax();
90 };
unsigned int ids[31]
Definition: SESSurface.h:21
Struct for molecule data.
Definition: Molecule.h:36
glm::vec3 getTexMax()
Definition: SESSurface.cpp:104
Wrapper class for GL_TEXTURE_3D.
Definition: VolumetricTexture.h:9
void bindToUnit(int unit)
Definition: SESSurface.cpp:94
SESSurface(const Molecule &molecule, float probeRadius)
Definition: SESSurface.cpp:7
Class handling shader construction and managment.
Definition: Shader.h:17
glm::vec3 getTexMin()
Definition: SESSurface.cpp:99
unsigned int count
Definition: SESSurface.h:18
Struct for the cells of the grid where the atoms are stored in. This grid is used for faster neighbor...
Definition: SESSurface.h:15
Class for the surface representation of a Molecule.
Definition: SESSurface.h:30