26 #ifndef STRUCTURALCOMPONENTPROPERTIES_H 27 #define STRUCTURALCOMPONENTPROPERTIES_H 120 double getRed()
const;
121 double getGreen()
const;
122 double getBlue()
const;
123 double getAlpha()
const;
124 double* getRGB()
const;
125 double* getRGBA()
const;
126 Color getColor()
const;
128 void setRed(
const double r);
129 void setGreen(
const double g);
130 void setBlue(
const double b);
131 void setAlpha(
const double a);
132 void setRGB(
const double* rgb);
133 void setRGB(
const double r,
const double g,
const double b);
134 void setRGBA(
const double r,
const double g,
const double b,
const double a);
135 void setRGBA(
const double* rgba);
136 void setColor(
Color c);
144 std::string getModeString()
const;
150 virtual void xmlPrint(std::ostream&);
218 setRGB(rgb[0], rgb[1], rgb[2]);
231 setRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
239 setRGBA(1.0, 0.0, 0.0, 1.0);
243 setRGBA(0.0, 1.0, 0.0, 1.0);
247 setRGBA(0.0, 0.0, 1.0, 1.0);
251 setRGBA(0.8, 0.8, 0.8, 1.0);
259 colorRGBA =
new double[4];
267 return mode.getMode();
271 return mode.getModeString();
275 return mode.isVisible(m);
279 mode.setVisible(m, b);
283 #endif //STRUCTURALCOMPONENTPROPERTIES_H
void setVisible(const RenderingMode::Mode, const bool)
Definition: StructuralComponentProperties.h:278
StructuralComponentProperties(PhysicalModel *p, const double r, const double g, const double b, const std::string n)
Definition: StructuralComponentProperties.h:95
void setColor(Color c)
Definition: StructuralComponentProperties.h:235
full complete flashy green
Definition: StructuralComponentProperties.h:52
classic gray
Definition: StructuralComponentProperties.h:54
std::string getModeString() const
get the string equivalent to the enum rendering mode
Definition: StructuralComponentProperties.h:270
full complete flashy red
Definition: StructuralComponentProperties.h:51
double getRed() const
Definition: StructuralComponentProperties.h:160
void setGreen(const double g)
Definition: StructuralComponentProperties.h:195
StructuralComponentProperties(PhysicalModel *p, const double *rgb, const std::string n)
Definition: StructuralComponentProperties.h:80
void setRGB(const double *rgb)
Definition: StructuralComponentProperties.h:217
void setBlue(const double b)
Definition: StructuralComponentProperties.h:200
Describes the properties common to all structures and components.
Definition: Properties.h:59
~StructuralComponentProperties()
Definition: StructuralComponentProperties.h:116
StructuralComponentProperties(PhysicalModel *p, const double r, const double g, const double b)
use 3 floats to set the color
Definition: StructuralComponentProperties.h:88
full complete flashy blue
Definition: StructuralComponentProperties.h:53
RenderingMode::Mode getMode() const
Definition: StructuralComponentProperties.h:266
Definition: RenderingMode.h:45
Color color
Definition: StructuralComponentProperties.h:155
void setAlpha(const double a)
Definition: StructuralComponentProperties.h:205
double * getRGB() const
Definition: StructuralComponentProperties.h:176
void setMode(const RenderingMode::Mode)
Definition: StructuralComponentProperties.h:262
StructuralComponentProperties(PhysicalModel *p, const Color c, const std::string n)
Definition: StructuralComponentProperties.h:66
double getBlue() const
Definition: StructuralComponentProperties.h:168
double * getRGBA() const
Definition: StructuralComponentProperties.h:180
double getAlpha() const
Definition: StructuralComponentProperties.h:172
bool isVisible(const RenderingMode::Mode mode) const
Definition: StructuralComponentProperties.h:274
StructuralComponentProperties(PhysicalModel *p)
defaultcolor is gray
Definition: StructuralComponentProperties.h:103
double getGreen() const
Definition: StructuralComponentProperties.h:164
StructuralComponentProperties(PhysicalModel *p, const double *rgb)
use a double[3] array to set the color
Definition: StructuralComponentProperties.h:73
double * colorRGBA
Definition: StructuralComponentProperties.h:153
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40
void setRed(const double r)
Definition: StructuralComponentProperties.h:190
A class that manages the structural component properties.
Definition: StructuralComponentProperties.h:44
no color given, decided by the GUI
Definition: StructuralComponentProperties.h:50
This is the main class of this project.
Definition: PhysicalModel.h:86
void setRGBA(const double r, const double g, const double b, const double a)
Definition: StructuralComponentProperties.h:222
Handle rendering options (surface and wireframe) of an Object3D.
Definition: RenderingMode.h:37
Color getColor() const
Definition: StructuralComponentProperties.h:184
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
void alloc()
Definition: StructuralComponentProperties.h:258
StructuralComponentProperties(PhysicalModel *p, const Color c)
use a Color constant to set the color
Definition: StructuralComponentProperties.h:59
RenderingMode mode
Definition: StructuralComponentProperties.h:156
Color
Default color settings.
Definition: StructuralComponentProperties.h:49
StructuralComponentProperties(PhysicalModel *p, const std::string n)
Definition: StructuralComponentProperties.h:110