25 #ifndef PML_COMPONENT_H
26 #define PML_COMPONENT_H
45 class 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();
234 void create3DStructure();
244 vtkSmartPointer<vtkCell> cellToVTK(
Cell* cell);
283 void createAtomSelectionVTKPipeline();
#define PML_COMPONENT_API
Definition: PMLComponentAPI.h:12
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
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
PhysicalModel * physicalModel
The library pml object that uses pmlschema to read the pml information for the xml file.
Definition: PMLComponent.h:213
bool neverSelected
the first selection should trigger the pml exporer action (default action)
Definition: PMLComponent.h:219
vtkSmartPointer< vtkUnstructuredGrid > mainGrid
The 3D grid containing all the cells of the PML.
Definition: PMLComponent.h:228
QMap< QString, vtkSmartPointer< vtkIdTypeArray > > scCellIdArrayMap
The association structural component <-> vtkIdTypeArray for Cells selection.
Definition: PMLComponent.h:267
vtkSmartPointer< vtkIdTypeArray > selectedAtomIdArray
The vtkIdTypeArray for atom selection (contains all the id array that corresponds to a selected atom)
Definition: PMLComponent.h:259
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
static QPixmap * myPixmap
the PMLComponent icon
Definition: PMLComponent.h:216
vtkSmartPointer< vtkPoints > thePoints
The 3D VTK cloud points of the atoms read.
Definition: PMLComponent.h:225
QMap< QString, vtkSmartPointer< vtkSelection > > scCellSelectionMap
The association structural component <-> vtkSelection for Cells selection.
Definition: PMLComponent.h:272
vtkSmartPointer< vtkSelection > selectedAtomSelection
The vtkSelection for atom selection.
Definition: PMLComponent.h:262
std::AtomPointIdMap atomPointIdMap
the Atom / vtkPoint Id map
Definition: PMLComponent.h:231
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:422
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:496
void initDynamicProperties()
create and initialize dynamic properties
Definition: MeshComponent.cpp:308
QPixmap getIcon() override
Get the pixmap that will be displayed for this node.
Definition: MeshComponent.cpp:1149
void init()
initialisation of the mesh component members
Definition: MeshComponent.cpp:105
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
Definition: Action.cpp:35
QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding)