From: pkv Date: Tue, 30 Aug 2005 06:52:34 +0000 (+0000) Subject: adds IDs mapping X-Git-Tag: BR-D5-38-2003_D2005-12-09~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80f0ed59523a6b31d2feb2ee5dd2c8ab267021b6;p=modules%2Fgui.git adds IDs mapping --- diff --git a/src/VTKViewer/VTKViewer_AppendFilter.cxx b/src/VTKViewer/VTKViewer_AppendFilter.cxx index 1047676ef..990a751a4 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.cxx +++ b/src/VTKViewer/VTKViewer_AppendFilter.cxx @@ -72,7 +72,7 @@ vtkStandardNewMacro(VTKViewer_AppendFilter); VTKViewer_AppendFilter::VTKViewer_AppendFilter() { - myDoMappingFlag=true; + myDoMappingFlag=false;//modified by NIZNHY-PKV Tue Aug 30 10:09:50 2005ft } VTKViewer_AppendFilter::~VTKViewer_AppendFilter() @@ -102,16 +102,23 @@ void VTKViewer_AppendFilter::Reset() myCellIds.clear(); myNodeRanges.clear(); myCellRanges.clear(); + //modified by NIZNHY-PKV Tue Aug 30 10:09:35 2005f + myNodeMapObjIDVtkID.clear(); + myCellMapObjIDVtkID.clear(); + //modified by NIZNHY-PKV Tue Aug 30 10:09:39 2005t } void VTKViewer_AppendFilter::DoMapping() { - int i, j, i1, i2; + int i, j, i1, i2, iNodeCnt, iCellCnt; + IteratorOfDataMapOfIntegerInteger aMapIt; vtkIdType aNbPnts, aNbCells, aId; vtkDataSet *pDS; // Reset(); // + iNodeCnt=0; + iCellCnt=0; for (i=0; i #include +//pkv f +#include +using namespace std; +//pkv t + /*! \brief This class used same as vtkAppendFilter. See documentation on VTK for more information. */ class VTKVIEWER_EXPORT VTKViewer_AppendFilter : public vtkAppendFilter @@ -29,6 +34,12 @@ public: int GetNodeObjId(int theVtkID, int& theInputIndex); + + //pkv f + int GetElemVtkID(int theObjID); + + int GetNodeVtkID(int theObjID); + //pkv t // protected: /*! \fn VTKViewer_AppendFilter(); @@ -51,14 +62,21 @@ protected: private: typedef std::vector TVectorId; typedef std::vector VectorInt; - + //pkv f + typedef std::map > DataMapOfIntegerInteger; + typedef std::map < int, int, std::less >::iterator IteratorOfDataMapOfIntegerInteger; + typedef std::map < int, int, std::less >::value_type PairOfDataMapOfIntegerInteger; + //pkv t private: bool myDoMappingFlag; TVectorId myNodeIds; TVectorId myCellIds; VectorInt myNodeRanges; VectorInt myCellRanges; - + //pkv f + DataMapOfIntegerInteger myNodeMapObjIDVtkID; + DataMapOfIntegerInteger myCellMapObjIDVtkID; + //pkv t }; #endif