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
30
class
SESSurface
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
};
SSBO< Atom >
GridCell::ids
unsigned int ids[31]
Definition:
SESSurface.h:21
Molecule
Struct for molecule data.
Definition:
Molecule.h:36
SESSurface::getTexMax
glm::vec3 getTexMax()
Definition:
SESSurface.cpp:104
VolumetricTexture
Wrapper class for GL_TEXTURE_3D.
Definition:
VolumetricTexture.h:9
SESSurface::bindToUnit
void bindToUnit(int unit)
Definition:
SESSurface.cpp:94
SESSurface::SESSurface
SESSurface(const Molecule &molecule, float probeRadius)
Definition:
SESSurface.cpp:7
Shader
Class handling shader construction and managment.
Definition:
Shader.h:17
SESSurface::getTexMin
glm::vec3 getTexMin()
Definition:
SESSurface.cpp:99
GridCell::count
unsigned int count
Definition:
SESSurface.h:18
GridCell
Struct for the cells of the grid where the atoms are stored in. This grid is used for faster neighbor...
Definition:
SESSurface.h:15
SESSurface
Class for the surface representation of a Molecule.
Definition:
SESSurface.h:30
Molecule
SESSurface.h
Generated by
1.8.15