26 #ifndef STRUCTURALCOMPONENTPROPERTIES_H
27 #define STRUCTURALCOMPONENTPROPERTIES_H
128 void setRed(
const double r);
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);
150 virtual void xmlPrint(std::ostream&);
218 setRGB(rgb[0], rgb[1], rgb[2]);
231 setRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
258 inline void StructuralComponentProperties::alloc() {
259 colorRGBA =
new double[4];
This is the main class of this project.
Definition: PhysicalModel.h:86
Describes the properties common to all structures and components.
Definition: Properties.h:59
Handle rendering options (surface and wireframe) of an Object3D.
Definition: RenderingMode.h:37
void setMode(const Mode mode)
set a vizualisation mode
Definition: RenderingMode.h:137
void setVisible(const Mode mode, const bool value)
Set a rendering mode visible or not.
Definition: RenderingMode.h:69
bool isVisible(const Mode mode) const
Return if a rendering mode is currently visible or not.
Definition: RenderingMode.h:101
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40
@ WIREFRAME_AND_SURFACE
Definition: RenderingMode.h:45
std::string getModeString() const
get the string equivalent to the enum rendering mode
Definition: RenderingMode.h:213
RenderingMode::Mode getMode() const
get current mode
Definition: RenderingMode.h:173
A class that manages the structural component properties.
Definition: StructuralComponentProperties.h:44
double getGreen() const
Definition: StructuralComponentProperties.h:164
void setRGB(const double *rgb)
Definition: StructuralComponentProperties.h:217
void setMode(const RenderingMode::Mode)
Definition: StructuralComponentProperties.h:262
StructuralComponentProperties(PhysicalModel *p, const Color c)
use a Color constant to set the color
Definition: StructuralComponentProperties.h:59
void setVisible(const RenderingMode::Mode, const bool)
Definition: StructuralComponentProperties.h:278
StructuralComponentProperties(PhysicalModel *p, const double *rgb, const std::string n)
Definition: StructuralComponentProperties.h:80
StructuralComponentProperties(PhysicalModel *p, const double r, const double g, const double b)
use 3 floats to set the color
Definition: StructuralComponentProperties.h:88
StructuralComponentProperties(PhysicalModel *p, const double r, const double g, const double b, const std::string n)
Definition: StructuralComponentProperties.h:95
Color
Default color settings.
Definition: StructuralComponentProperties.h:49
@ OTHER
color is defined using RGBA
Definition: StructuralComponentProperties.h:55
@ GREEN
full complete flashy green
Definition: StructuralComponentProperties.h:52
@ DEFAULT
no color given, decided by the GUI
Definition: StructuralComponentProperties.h:50
@ GRAY
classic gray
Definition: StructuralComponentProperties.h:54
@ BLUE
full complete flashy blue
Definition: StructuralComponentProperties.h:53
@ RED
full complete flashy red
Definition: StructuralComponentProperties.h:51
double getAlpha() const
Definition: StructuralComponentProperties.h:172
~StructuralComponentProperties()
Definition: StructuralComponentProperties.h:116
StructuralComponentProperties(PhysicalModel *p)
defaultcolor is gray
Definition: StructuralComponentProperties.h:103
double getRed() const
Definition: StructuralComponentProperties.h:160
double * getRGB() const
Definition: StructuralComponentProperties.h:176
void setAlpha(const double a)
Definition: StructuralComponentProperties.h:205
void setRed(const double r)
Definition: StructuralComponentProperties.h:190
StructuralComponentProperties(PhysicalModel *p, const std::string n)
Definition: StructuralComponentProperties.h:110
StructuralComponentProperties(PhysicalModel *p, const Color c, const std::string n)
Definition: StructuralComponentProperties.h:66
virtual void xmlPrint(std::ostream &)
print to an output stream in "pseaudo" XML format.
Definition: StructuralComponentProperties.cpp:81
Color getColor() const
Definition: StructuralComponentProperties.h:184
RenderingMode::Mode getMode() const
Definition: StructuralComponentProperties.h:266
bool isVisible(const RenderingMode::Mode mode) const
Definition: StructuralComponentProperties.h:274
std::string getModeString() const
get the string equivalent to the enum rendering mode
Definition: StructuralComponentProperties.h:270
StructuralComponentProperties(PhysicalModel *p, const double *rgb)
use a double[3] array to set the color
Definition: StructuralComponentProperties.h:73
void setBlue(const double b)
Definition: StructuralComponentProperties.h:200
void setGreen(const double g)
Definition: StructuralComponentProperties.h:195
double getBlue() const
Definition: StructuralComponentProperties.h:168
double * getRGBA() const
Definition: StructuralComponentProperties.h:180
void setRGBA(const double r, const double g, const double b, const double a)
Definition: StructuralComponentProperties.h:222
void setColor(Color c)
Definition: StructuralComponentProperties.h:235
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52