From 82e4d6d6fc705ae98a48b79769b2b90b5a008f93 Mon Sep 17 00:00:00 2001 From: pkv Date: Mon, 29 Aug 2005 05:37:31 +0000 Subject: [PATCH] The added funcionality allows to turn on/off the mapping process for the filter --- src/VTKViewer/VTKViewer_AppendFilter.cxx | 18 +++++++++++++++--- src/VTKViewer/VTKViewer_AppendFilter.h | 6 ++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/VTKViewer/VTKViewer_AppendFilter.cxx b/src/VTKViewer/VTKViewer_AppendFilter.cxx index 53fa80b8c..1047676ef 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.cxx +++ b/src/VTKViewer/VTKViewer_AppendFilter.cxx @@ -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() diff --git a/src/VTKViewer/VTKViewer_AppendFilter.h b/src/VTKViewer/VTKViewer_AppendFilter.h index e73051fcf..f67eedf91 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.h +++ b/src/VTKViewer/VTKViewer_AppendFilter.h @@ -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 VectorInt; private: + bool myDoMappingFlag; TVectorId myNodeIds; TVectorId myCellIds; VectorInt myNodeRanges; VectorInt myCellRanges; + }; #endif -- 2.39.2