26 #ifndef STRUCTURALCOMPONENT_H
27 #define STRUCTURALCOMPONENT_H
122 void xmlPrint(std::ostream &)
const;
146 void setColor(
const double r,
const double b,
const double g,
const double a);
148 void setColor(
const double r,
const double b,
const double g);
154 void getColor(
double *r,
double *g,
double *b,
double *a)
const;
223 std::vector <Structure *>::iterator it=
structures.begin();
224 while (it!=
structures.end() && (*it)->getIndex()!=i)
232 std::vector <Structure *>::iterator it=
structures.begin();
233 while (it!=
structures.end() && (*it)->getName()!=n)
266 #endif //STRUCTURALCOMPONENT_H
double * getColor() const
Get the color.
void plannedNumberOfStructures(const unsigned int)
optimize the I/O of the std:vector structures.
Definition: StructuralComponent.h:258
void setColor(const StructuralComponentProperties::Color c)
Set the new color (using a StructuralComponentProperties::Color enum)
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:41
virtual void setPhysicalModel(PhysicalModel *)
set the physical model (recursively to all cells or to all atoms)
Pure virtual class that represent an element of the structure.
Definition: Structure.h:43
ComposedBy
What this structural component is made of.
Definition: StructuralComponent.h:169
StructuralComponent * getAtoms()
Return a StructuralComponent with all the atoms of this structural component.
bool isStructureIn(Structure *s)
Check if a given structure is present in the list.
StructuralComponentProperties * getProperties()
get the structural component properties of this SC
Definition: StructuralComponent.h:262
virtual void removeStructure(Structure *s)
Remove a structure from the list (and tells the structure to remove this structural component from it...
Definition: StructuralComponent.h:243
void setMode(const RenderingMode::Mode)
set the rendering mode
StructuralComponent(PhysicalModel *)
Default Constructor.
void removeStructuralComponent(StructuralComponent *)
remove a particular StructuralComponent from the list
Definition: Structure.h:125
Structure * getStructure(const unsigned int) const
get a structure by its index (fisrt structure is at index 0)
Definition: StructuralComponent.h:216
bool addStructureIfNotIn(Structure *s)
Add a Structure in the list, only if it is not already in (and tells the structure to remove this str...
StructuralComponent * atomList
List of all the atoms of this structural component, build the first time.
Definition: StructuralComponent.h:203
virtual void deleteAllStructures()
this method free all the sub-components (i.e.
StructuralComponentProperties::Color getStructuralComponentPropertiesColor() const
Return the color as a code (see StructuralComponentProperties::Color enum)
there are no structure yet, so everything is possible
Definition: StructuralComponent.h:170
virtual bool isVisible(const RenderingMode::Mode mode) const
tell if a specific rendering mode is visible or not
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
void addStructure(Structure *s, bool check=true)
Add a Structure in the list (and tells the structure to remove this structural component from its lis...
Definition: StructuralComponent.h:208
unsigned int getNumberOfCells() const
get the total nr of cell of the component
Mode
This is a duplicate of RenderingMode Mode....
Definition: RenderingMode.h:40
Structure * getStructureByIndex(const unsigned int)
get a structure by its unique index
Definition: StructuralComponent.h:222
Cell * getCell(unsigned int) const
get cell by order number (not cell index)
ComposedBy composedBy()
return the type of structure composing the structural component: a structural component is either a l...
This is an automatically generated class for custom StructuralComponent properties.
Definition: StructuralComponentProperties.h:45
virtual ~StructuralComponent()
delete all the structures (call the deleteAllStructures method)
This is the main class of this project.
Definition: PhysicalModel.h:74
the structural component is made of atoms
Definition: StructuralComponent.h:172
bool isCompatible(Structure *)
return true if the given structure is compatible with what composes this structural component...
std::vector< Structure * > structures
List of the structure representing this component, all the structure in this list are either all Atom...
Definition: StructuralComponent.h:199
RenderingMode::Mode getMode() const
get the rendering mode
unsigned int getNumberOfStructures() const
get the number of structures
Definition: StructuralComponent.h:240
string(REGEX REPLACE"^.*-(.*)-.*""\\1"ARCH"${CAMITK_CONTINUOUS_INTEGRATION}") string(REGEX REPLACE"^.*-.*-(.*)""\\1"BUILDTYPE"$
Definition: continuous.cmake:34
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:48
Properties * properties
Definition: modeling/libraries/pml/Component.h:118
void xmlPrint(std::ostream &) const
print to an output stream in "pseudo" XML format (do nothing if there are no sub structures).
virtual void setVisible(const RenderingMode::Mode mode, const bool b)
set the visibility of a specific rendering mode
the structural component is made of cells
Definition: StructuralComponent.h:171
void addStructuralComponent(StructuralComponent *)
add a particular StructuralComponent in the list
Definition: Structure.h:121
virtual bool isInstanceOf(const char *) const
return true only if the parameter is equal to "StructuralComponent"
Definition: StructuralComponent.h:254
Structure * getStructureByName(const std::string)
get a structure by its name
Definition: StructuralComponent.h:231
Color
Default color settings.
Definition: BasicSCProperties.h:47