9 #include <QOpenGLBuffer>
10 #include <QOpenGLVertexArrayObject>
11 #include <QOpenGLShaderProgram>
86 void initGL(QOpenGLShaderProgram *mainShader, QOpenGLShaderProgram*shadowMapShader,QOpenGLShaderProgram* ambientOcclusionMapShader, QOpenGLShaderProgram * edgeShader, QOpenGLShaderProgram *haloShader);
99 QVector3D
findColor(std::string atomName);
152 std::map<std::string, QVector3D> *atomColorMap;
157 std::vector<QVector3D> *chainColorMap;
162 std::map<std::string, float> *covalentRadiusMap;
167 std::map<std::string, float> *vanDerWaalsRadiusMap;
172 QOpenGLVertexArrayObject vao;
177 QOpenGLVertexArrayObject haloVAO;
182 QOpenGLVertexArrayObject edgeVAO;
187 QOpenGLVertexArrayObject shadowMapVAO;
192 QOpenGLVertexArrayObject occlusionMapVAO;
197 QOpenGLBuffer vertexBuffer;
202 QOpenGLBuffer atomColorBuffer;
207 QOpenGLBuffer chainColorBuffer;
212 QOpenGLBuffer vanDerWaalsRadiusBuffer;
217 QOpenGLBuffer covalentRadiusBuffer;
222 QOpenGLBuffer quadBuffer;
228 void initAtomColorMap();
233 void initChainColorMap();
238 void initCovalentRadiusMap();
243 void initVanDerWaalsRadiusMap();
248 float boundingSphereRadius;
QVector3D findCameraTranslation()
findCameraTranslation
Definition: Molecule.cpp:376
The Atom struct - structure which encapsulated and simlates an atom, an elementary component of a mol...
Definition: Molecule.h:29
The Molecule class - This class represents a molecule. It consists of atoms and bonds.
Definition: Molecule.h:70
Definition: Molecule.h:23
float vanDerWaalsRadius
vanDerWaalsRadius - stores the vanDerWaals atomar radius
Definition: Molecule.h:49
RadiusEnum
The RadiusEnum enum - enumeration specifies the two possible types of radii, which the application vi...
Definition: Params.h:14
float distanceCameraTranslate
distanceCameraTranslate - distance by which the camera needs to be translated from center of model...
Definition: Molecule.h:64
void centerMolecule(QVector3D center)
centerMolecule - Resets the molecule to the center in world space (0, 0 ,0). This method must be call...
Definition: Molecule.cpp:368
QVector3D findColor(std::string atomName)
findColor
Definition: Molecule.cpp:314
Definition: Molecule.h:23
void draw(DRAW_TYPE type)
draw - Draws the corresponding VBO to the screen
Definition: Molecule.cpp:42
QVector3D chainColor
chainColor - Atom color specific to the chain it belongs to
Definition: Molecule.h:39
DRAW_TYPE
The DRAW_TYPE enum - enumeration which encapsulates the divers types of drawing used by the applicati...
Definition: Molecule.h:22
~Molecule()
Definition: Molecule.cpp:25
QVector3D findChainColor(int chainID)
findChainColor
Definition: Molecule.cpp:326
QVector3D findMoleculeCenter()
findMoleculeCenter
Definition: Molecule.cpp:354
Molecule(QMatrix4x4 _modelMatrix)
Definition: Molecule.cpp:6
QVector3D position
position - Describes the position of the sphere in model space
Definition: Molecule.h:54
Definition: Molecule.h:23
Definition: SceneObject.h:8
float covalentRadius
covalentRadius - stores the covalent atomar radius
Definition: Molecule.h:44
float getBoundingSphereRadius()
getBoundingSphereRadius
Definition: Molecule.cpp:395
void initGL(QOpenGLShaderProgram *mainShader, QOpenGLShaderProgram *shadowMapShader, QOpenGLShaderProgram *ambientOcclusionMapShader, QOpenGLShaderProgram *edgeShader, QOpenGLShaderProgram *haloShader)
initGL - Initializes the communication with opengl
Definition: Molecule.cpp:86
Definition: Molecule.h:23
std::vector< Atom > * atoms
atoms - Contains information of all atoms-> Stores all the atoms in this molecule.
Definition: Molecule.h:139
QVector3D color
color - specific Atom color
Definition: Molecule.h:34
std::string name
name - Stores the name of the molecule
Definition: Molecule.h:59
float findRadius(std::string atomName, RadiusEnum radiusType)
findRadius
Definition: Molecule.cpp:334
Definition: Molecule.h:23