25#ifndef PML_COMPONENT_H
26#define PML_COMPONENT_H
45class vtkUnstructuredGrid;
61#include <CamiTKDisableWarnings>
62#include <vtkExtractSelection.h>
63#include <CamiTKReEnableWarnings>
65#include <vtkSelectionNode.h>
135 virtual void setSelected(
const bool b,
const bool recursive =
true);
216 static QPixmap* myPixmap;
225 vtkSmartPointer<vtkPoints> thePoints;
228 vtkSmartPointer<vtkUnstructuredGrid> mainGrid;
234 void create3DStructure();
244 vtkSmartPointer<vtkCell> cellToVTK(
Cell* cell);
259 vtkSmartPointer<vtkIdTypeArray> selectedAtomIdArray;
262 vtkSmartPointer<vtkSelection> selectedAtomSelection;
267 QMap<QString, vtkSmartPointer<vtkIdTypeArray> > scCellIdArrayMap;
272 QMap<QString, vtkSmartPointer<vtkSelection> > scCellSelectionMap;
283 void createAtomSelectionVTKPipeline();
295 return (result == atomPointIdMap.end()) ? 0 : (result->second);
#define PML_COMPONENT_API
Definition PMLComponentAPI.h:12
An atom has an unique index in the physical model object, a 3D position, and different basic properti...
Definition Atom.h:49
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition Cell.h:46
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition MultiComponent.h:44
vtkIdType getPointId(const Atom *a)
get the point Id from the corresponding atom, this is the opposite of pml->getAtom(id)
Definition PMLComponent.h:290
void updateSelection()
Update the POINTS and CELLS selection for the whole 3D structure by telling the corresponding extract...
Definition PMLComponent.cpp:513
PMLComponent(const QString &file)
Construct the PML component directly from the .pml xml file.
Definition PMLComponent.cpp:77
void init()
initialize information (properties) and geometric representation from the physical model
Definition PMLComponent.cpp:109
void selectAtom(const Atom *atom)
Select the given atom in the 3D structure.
Definition PMLComponent.cpp:441
void unselectItems()
Unselect all the SC, MC, Atoms and Cells previously selected on the 3D structure.
Definition PMLComponent.cpp:551
void refreshDisplay()
Refresh the display of the component according to the selected 3D items by the user.
Definition PMLComponent.cpp:349
void selectCell(Cell *cell, bool showAtomGlyph)
Select the given cell in the 3D structure.
Definition PMLComponent.cpp:447
void selectMC(MultiComponent *mc, bool showAtomGlyph)
Select the given multi component in the 3D structure by highlighting all its structural components.
Definition PMLComponent.cpp:500
PhysicalModel * getPhysicalModel()
Definition PMLComponent.cpp:104
void selectSC(StructuralComponent *sc, bool showAtomGlyph)
Select the given structural component in the 3D structure by highlighting all its atoms and cells.
Definition PMLComponent.cpp:473
This is the main class of this project.
Definition PhysicalModel.h:86
A structural component is composed either by cell or by atoms.
Definition StructuralComponent.h:52
Exception class to handle abortion in component instantiation.
Definition AbortException.h:43
void propertyValueChanged(QString name) override
This method is called when a dynamic property value has been modified.
Definition sdk/libraries/core/component/Component.cpp:508
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag.
Definition sdk/libraries/core/component/Component.cpp:404
Basic component to manage any kind of mesh.
Definition MeshComponent.h:53
virtual int addSelection(const QString &name, int fieldType, int contentType, vtkSmartPointer< vtkAbstractArray > array, MeshSelectionModel::InsertionPolicy policy=MeshSelectionModel::REPLACE)
Add a selection.
Definition MeshComponent.cpp:575
void initDynamicProperties()
create and initialize dynamic properties
Definition MeshComponent.cpp:387
QPixmap getIcon() override
Get the pixmap that will be displayed for this node.
Definition MeshComponent.cpp:1282
InsertionPolicy
Definition MeshSelectionModel.h:50
@ REPLACE
Definition MeshSelectionModel.h:51
std::map< const Atom *, const vtkIdType > AtomPointIdMap
definition of the association set (=map in STL) AtomPointIdMap.
Definition PMLComponent.h:79
std::map< const Atom *, const vtkIdType >::iterator AtomPointIdMapIterator
the iterator corresponding to the AtomPointIdMap map
Definition PMLComponent.h:81
std::pair< const Atom *, const vtkIdType > AtomPointIdPair
As the PhysicalModel atom index can be different to the node index (continuity in id is not mandatory...
Definition PMLComponent.h:73