Molecule Visualizer
 All Classes Namespaces Files Functions Enumerations Enumerator Macros Groups Pages
Atom.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef ATOM_HPP
8 #define ATOM_HPP
9 
10 #include <glm/glm.hpp>
11 
12 
13 class Atom
14 {
15 public:
24  Atom(float x, float y, float z, glm::vec3 color, float radius);
25 
35  Atom(float x, float y, float z, glm::vec3 color, float radius, glm::vec3 chainColor);
36 
43  Atom(glm::vec3 pos, glm::vec3 color, float radius);
44 
52  Atom(glm::vec3 pos, glm::vec3 color, float radius, glm::vec3 chainColor);
53 
57  ~Atom();
58 
63  glm::vec4 getPos() const;
64 
69  glm::vec3 getColor() const;
70 
75  glm::vec3 getChainColor() const;
76 
81  float getRadius() const;
82 
88  void setColor(glm::vec3 color);
89 
97  void setColor(float r, float g, float b);
98 
106  void offsetPos(float x, float y, float z);
107 
113  void offsetPos(glm::vec3 newPos);
114 
120  void setChainColor(glm::vec3 color);
121 
129  void setChainColor(float r, float g, float b);
130 
131 private:
132  glm::vec4 m_pos;
133  glm::vec3 m_color;
134  float m_radius;
135  glm::vec3 m_chainColor;
136 };
137 
138 
139 
140 #endif
141 
~Atom()
Default destructor.
Definition: Atom.cpp:94
void setColor(glm::vec3 color)
A member function to set the color.
Definition: Atom.cpp:60
void offsetPos(float x, float y, float z)
A member function to offset the position.
Definition: Atom.cpp:77
glm::vec3 getChainColor() const
A member function to get the chain color.
Definition: Atom.cpp:50
Definition: Atom.hpp:13
void setChainColor(glm::vec3 color)
A member function to set the chain color.
Definition: Atom.cpp:84
glm::vec4 getPos() const
A member function to get the current position.
Definition: Atom.cpp:40
Atom(float x, float y, float z, glm::vec3 color, float radius)
Constructor.
Definition: Atom.cpp:10
float getRadius() const
A member function to get the radius.
Definition: Atom.cpp:55
glm::vec3 getColor() const
A member function to get the color.
Definition: Atom.cpp:45