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

Class representing a single Atom of a Molecule (an Atom is drawn as a colored sphere) More...

#include <Atom.hpp>

Public Member Functions

 Atom (float x, float y, float z, glm::vec3 color, float radius)
 Creates an atom with given position (x,y,z), color (3d vector with RGB values, each channel between 0 to 1) and radius.
 
 Atom (float x, float y, float z, glm::vec3 color, glm::vec3 chainColor, float radius)
 
virtual ~Atom ()
 Deletes the atom.
 
glm::vec4 GetPosition () const
 Returns the position of the atom in homogeneous coordinates, the 4th component w is always 1.
 
glm::vec3 GetColor () const
 Returns the color of the atom in RGB (each channel between 0 and 1)
 
float GetRadius () const
 Returns the radius of the atom.
 
void SetColor (float r, float g, float b)
 Sets the color of the atom in RGB (each color channel has to be between 0 and 1)
 
void MovePosition (float offset_x, float offset_y, float offset_z)
 Moves the atom by a given offset in each of the three directions.
 
glm::vec3 GetChainColor () const
 
void SetChainColor (float r, float g, float b)
 

Detailed Description

Class representing a single Atom of a Molecule (an Atom is drawn as a colored sphere)

Definition at line 7 of file Atom.hpp.


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