Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to paraview 5.4
[modules/gui.git]
/
src
/
VTKViewer
/
VTKViewer_ExtractUnstructuredGrid.h
diff --git
a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
index dfbc31aeab6dd77fa3bfeeda0e223af49d704754..897de6f556600abf212e96e8aeff2bed42fee6a4 100755
(executable)
--- a/
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
+++ b/
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-53,7
+53,7
@@
public:
enum EExtraction{ eCells, ePoints};
//! Sets mode of extraction to \a theExtractionMode
void SetModeOfExtraction(EExtraction theExtractionMode){
enum EExtraction{ eCells, ePoints};
//! Sets mode of extraction to \a theExtractionMode
void SetModeOfExtraction(EExtraction theExtractionMode){
- myExtractionMode = theExtractionMode; Modified();
+ if ( myExtractionMode != theExtractionMode ) { myExtractionMode = theExtractionMode; Modified(); }
}
//! Get Extraction mode (Return: \a myExtractionMode field)
EExtraction GetModeOfExtraction(){ return myExtractionMode;}
}
//! Get Extraction mode (Return: \a myExtractionMode field)
EExtraction GetModeOfExtraction(){ return myExtractionMode;}
@@
-61,47
+61,47
@@
public:
enum EChanging{ ePassAll, eAdding, eRemoving};
//! Sets mode of changing to \a theChangeMode
void SetModeOfChanging(EChanging theChangeMode){
enum EChanging{ ePassAll, eAdding, eRemoving};
//! Sets mode of changing to \a theChangeMode
void SetModeOfChanging(EChanging theChangeMode){
- myChangeMode = theChangeMode;
- Modified();
+ if ( myChangeMode != theChangeMode ) { myChangeMode = theChangeMode; Modified(); }
}
//! Return \a myChangeMode field
}
//! Return \a myChangeMode field
- EChanging GetModeOfChanging(){ return myChangeMode;}
+ EChanging GetModeOfChanging(){ return myChangeMode;
}
//! Add cell id to \a myCellIds std::set
void RegisterCell(vtkIdType theCellId);
//! Check if myCellIds is empty.
//! Add cell id to \a myCellIds std::set
void RegisterCell(vtkIdType theCellId);
//! Check if myCellIds is empty.
- int IsCellsRegistered() { return !myCellIds.empty();}
+ int IsCellsRegistered() { return !myCellIds.empty();
}
//! Remove the cell from the output
//! Remove the cell from the output
- void ClearRegisteredCells() {
- myCellIds.clear();
- Modified();
+ void ClearRegisteredCells() {
+ if ( !myCellIds.empty() ) { myCellIds.clear(); Modified(); }
}
}
-
+
//! Add cell type to \a myCellTypes std::set
void RegisterCellsWithType(vtkIdType theCellType);
//! Check if myCellTypes is empty.
//! Add cell type to \a myCellTypes std::set
void RegisterCellsWithType(vtkIdType theCellType);
//! Check if myCellTypes is empty.
- int IsCellsWithTypeRegistered() { return !myCellTypes.empty();}
+ int IsCellsWithTypeRegistered() { return !myCellTypes.empty();
}
//! Remove every cells with the type from the output
//! Remove every cells with the type from the output
- void ClearRegisteredCellsWithType() {
- myCellTypes.clear();
- Modified();
+ void ClearRegisteredCellsWithType() {
+ if ( !myCellTypes.empty() ) { myCellTypes.clear(); Modified(); }
}
//! \brief Do the filter do some real work
}
//! \brief Do the filter do some real work
- int IsChanging() { return IsCellsRegistered() || IsCellsWithTypeRegistered();}
+ int IsChanging() { return IsCellsRegistered() || IsCellsWithTypeRegistered();
}
//! \brief Do it keep the mapping between input's and output's UnstructuredGrid
void SetStoreMapping(int theStoreMapping);
//! Get \a myStoreMapping
//! \brief Do it keep the mapping between input's and output's UnstructuredGrid
void SetStoreMapping(int theStoreMapping);
//! Get \a myStoreMapping
- int GetStoreMapping(){ return myStoreMapping;}
+ int GetStoreMapping(){ return myStoreMapping;
}
- //! Gets the input id by output id.
+ //! Computes a map out IDs to in IDs. Call it before GetInputId()!!!
+ void BuildOut2InMap();
+ //! Gets the input id by output id. Call BuildOut2InMap() before
vtkIdType GetInputId(int theOutId) const;
//! Gets the output id by input id.
vtkIdType GetInputId(int theOutId) const;
//! Gets the output id by input id.
- vtkIdType GetOutputId(int theInId) const;
+
//
vtkIdType GetOutputId(int theInId) const;
- typedef std::vector<vtkIdType> TVectorId;
+ typedef std::vector<vtkIdType>
TVectorId;
typedef std::map<vtkIdType,vtkIdType> TMapId;
typedef std::map<vtkIdType,vtkIdType> TMapId;
+ typedef std::set<vtkIdType> TSetId;
protected:
VTKViewer_ExtractUnstructuredGrid();
protected:
VTKViewer_ExtractUnstructuredGrid();
@@
-112,13
+112,12
@@
protected:
EExtraction myExtractionMode;
EChanging myChangeMode;
EExtraction myExtractionMode;
EChanging myChangeMode;
- typedef std::set<vtkIdType> TSetId;
TSetId myCellIds;
TSetId myCellTypes;
TSetId myCellIds;
TSetId myCellTypes;
- bool myStoreMapping;
+ bool myStoreMapping
, myPassAll
;
TVectorId myOut2InId;
TVectorId myOut2InId;
- TMapId myIn2OutId;
+
//
TMapId myIn2OutId;
private:
//! Not implemented.
private:
//! Not implemented.