COVISE Core
coChemicalElement.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef CO_CHEMICAL_ELEMENT_H
9#define CO_CHEMICAL_ELEMENT_H
10
11#include <util/coExport.h>
12#include <string>
13#include <vector>
14#include <map>
15
17
18namespace covise
19{
20
22{
23 public:
24 bool valid = false;
25 int number = 0;
28 float radius;
29 float color[4];
31 coChemicalElement(int number, std::string n, std::string sym, float r, float re, float g, float b);
33};
34
36{
37
38 public:
39 static coAtomInfo* instance();
41 float getRadius(int type);
42 void getColor(int type, float (&color)[4]);
43 std::vector<coChemicalElement> all;
44 std::map<std::string, int> idMap;
45
46
47 private:
48 coAtomInfo();
49 static bool initialized;
50 static const int numStaticAtoms = 118;
51 static coChemicalElement allStatic[numStaticAtoms];
52
54};
55
56}
57#endif
#define ALGEXPORT
Definition: coExport.h:337
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
GLdouble n
Definition: khronos-glext.h:8447
GLuint color
Definition: khronos-glext.h:6934
GLboolean GLboolean GLboolean b
Definition: khronos-glext.h:6895
GLboolean GLboolean g
Definition: khronos-glext.h:6895
GLdouble GLdouble GLdouble r
Definition: khronos-glext.h:6457
GLenum type
Definition: khronos-glext.h:6279
list of all chemical elements
Definition: coConfig.h:27
Definition: coChemicalElement.h:22
std::string symbol
Definition: coChemicalElement.h:27
float radius
Definition: coChemicalElement.h:28
std::string name
Definition: coChemicalElement.h:26
Definition: coChemicalElement.h:36
void getColor(int type, float(&color)[4])
std::map< std::string, int > idMap
Definition: coChemicalElement.h:44
float getRadius(int type)
static bool initialized
Definition: coChemicalElement.h:49
std::vector< coChemicalElement > all
Definition: coChemicalElement.h:43
static coAtomInfo * myInstance
Definition: coChemicalElement.h:53
int getType(const std::string &type)