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);
143 vtkIdType getPointId(
const Atom*
a);
155 void selectCell(
Cell* cell,
bool showAtomGlyph);
159 void selectAtom(
const Atom* atom);
172 void unselectItems();
176 void updateSelection();
186 void refreshDisplay();
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
This class manages a physical model (PML) CamiTK component.
Definition PMLComponent.h:103
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
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
virtual void setSelected(const bool b, const bool recursive=true)
Update the selection flag.
Definition sdk/libraries/core/component/Component.cpp:424
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:560
void initDynamicProperties()
create and initialize dynamic properties
Definition MeshComponent.cpp:372
QPixmap getIcon() override
Get the pixmap that will be displayed for this node.
Definition MeshComponent.cpp:1256
void updateProperty(QString, QVariant) override
update property: no specific properties to manage, this is needed to avoid console warnings.
Definition MeshComponent.h:134
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