]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
The added funcionality allows to turn on/off the mapping process for the filter
authorpkv <pkv@opencascade.com>
Mon, 29 Aug 2005 05:37:31 +0000 (05:37 +0000)
committerpkv <pkv@opencascade.com>
Mon, 29 Aug 2005 05:37:31 +0000 (05:37 +0000)
src/VTKViewer/VTKViewer_AppendFilter.cxx
src/VTKViewer/VTKViewer_AppendFilter.h

index 53fa80b8c14891a88f7e51f22efd0a62a582152b..1047676ef0e48e41ca96911db54e0e7266e0d127 100644 (file)
@@ -71,17 +71,29 @@ vtkCxxRevisionMacro(VTKViewer_AppendFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_AppendFilter);
 
 VTKViewer_AppendFilter::VTKViewer_AppendFilter() 
-{}
-
+{
+  myDoMappingFlag=true;
+}
 
 VTKViewer_AppendFilter::~VTKViewer_AppendFilter()
 {}
 
+void VTKViewer_AppendFilter::SetDoMappingFlag(const bool theFlag)
+{
+  myDoMappingFlag=theFlag;
+}
+
+bool VTKViewer_AppendFilter::DoMappingFlag() const
+{
+  return myDoMappingFlag;
+}
 
 void VTKViewer_AppendFilter::Execute()
 {
   vtkAppendFilter::Execute();
-  DoMapping();
+  if (myDoMappingFlag){
+    DoMapping();
+  }
 }
 
 void VTKViewer_AppendFilter::Reset()
index e73051fcfca12c60e8ae6b9f8a5e9c3b4c7b8289..f67eedf912786d789a0ada5832a3dadd22fb7229 100644 (file)
@@ -20,6 +20,10 @@ public:
    */
   vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter);
 
+  void SetDoMappingFlag(const bool theFlag);
+
+  bool DoMappingFlag() const;
+
   int GetElemObjId(int theVtkI, 
                   int& theInputIndex);
 
@@ -49,10 +53,12 @@ private:
   typedef std::vector<int> VectorInt;
 
 private:
+  bool      myDoMappingFlag;
   TVectorId myNodeIds;
   TVectorId myCellIds;
   VectorInt myNodeRanges;
   VectorInt myCellRanges;
+  
 };
 
 #endif