Molecule Viewer
 All Classes Functions Variables Enumerations Pages
Public Member Functions | List of all members
Loader Class Reference

Class responsible for loading a molecule. More...

#include <Loader.hpp>

Public Member Functions

 Loader ()
 Creates a Loader object.
 
virtual ~Loader ()
 Deletes the Loader object.
 
bool LoadMolecule (const std::string absoluePathToFile)
 Loads a molecule with a given absolue filename (*.pdb file). More...
 
GLuint GetVAO () const
 Returns the generated Vertex Array Object (sent to the GPU).
 
int GetAtomNumber () const
 Returns the number of atoms of the loaded molecule.
 
float GetBoundingSphere () const
 Returns the radius of the bounding sphere of the molecule (only a rough approximation!)
 
void SetTextureSize (int aoTextureSize)
 Sets the used ambient occlusion texture size (quadratic texture!). More...
 
const bool LoadedFirstTime () const
 Checks if a molecule was loaded since the loader was created. More...
 
void UpdateColorMode (int colorMode, bool loadingMolecule)
 Updates the current color mode of the rendering and sends the updated colors to the GPU. More...
 

Detailed Description

Class responsible for loading a molecule.

Atom colors and radius are hard coded (per Element) in this class.

Definition at line 10 of file Loader.hpp.

Member Function Documentation

const bool Loader::LoadedFirstTime ( ) const

Checks if a molecule was loaded since the loader was created.

Returns false if no molecule was ever loaded.

Definition at line 130 of file Loader.cpp.

bool Loader::LoadMolecule ( const std::string  absoluePathToFile)

Loads a molecule with a given absolue filename (*.pdb file).

Generates a Vertex array object with the loaded data and sends the VAO to the GPU. Returns true if it was successfully loaded.

Definition at line 174 of file Loader.cpp.

void Loader::SetTextureSize ( int  aoTextureSize)

Sets the used ambient occlusion texture size (quadratic texture!).

Has to be updated before a molecule is loaded.

Definition at line 24 of file Loader.cpp.

void Loader::UpdateColorMode ( int  colorMode,
bool  loadingMolecule 
)

Updates the current color mode of the rendering and sends the updated colors to the GPU.

colorMode: 0 = Color per atom, 1 = Color per chain, 2 = No color. loadingMolecule has to be false (except when the color is loaded the first time for a molecule.

Definition at line 134 of file Loader.cpp.


The documentation for this class was generated from the following files: