From 5d3a8699a80153f807cd71e28d0c259f2842a7dc Mon Sep 17 00:00:00 2001 From: akl Date: Thu, 9 Apr 2015 20:03:20 +0400 Subject: [PATCH] 52633: Activation of the ParaVis module leads to the breaking on the pre-selection and selection highlighting in the VTK Viewer. --- src/SVTK/SVTK_DeviceActor.cxx | 28 +++++++++++++--------------- src/VTKViewer/VTKViewer_Actor.cxx | 26 ++++++++++++-------------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index 47f10044b..d1cb76843 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -622,22 +622,20 @@ SVTK_DeviceActor ::Render(vtkRenderer *ren, vtkMapper* m) { int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology(); - double aFactor, aUnit; - vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); - - double aNewFactor = myPolygonOffsetFactor, aNewUnit = myPolygonOffsetUnits; - if(!myIsResolveCoincidentTopology){ - static double EPS = .01; - aNewFactor *= (1.0-EPS); - aNewUnit *= (1.0-EPS); + if(myIsResolveCoincidentTopology){ + double aFactor, aUnit; + vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); + + vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); + vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor, + myPolygonOffsetUnits); + Superclass::Render(ren,m); + + vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); + }else{ + vtkMapper::SetResolveCoincidentTopologyToOff(); + Superclass::Render(ren,m); } - - vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); - vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aNewFactor, - aNewUnit); - Superclass::Render(ren,m); - - vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology); } diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 2080fe6d7..76df0121d 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -219,22 +219,20 @@ VTKViewer_Actor } int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology(); - double aFactor, aUnit; - vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); - - double aNewFactor = myPolygonOffsetFactor, aNewUnit = myPolygonOffsetUnits; - if(!myIsResolveCoincidentTopology){ - static double EPS = .01; - aNewFactor *= (1.0-EPS); - aNewUnit *= (1.0-EPS); - } + if(myIsResolveCoincidentTopology){ + double aFactor, aUnit; + vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); - vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); - vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aNewFactor, - aNewUnit); - Superclass::Render(ren,m); + vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); + vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor, + myPolygonOffsetUnits); + Superclass::Render(ren,m); - vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); + vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); + }else{ + vtkMapper::SetResolveCoincidentTopologyToOff(); + Superclass::Render(ren,m); + } vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology); } -- 2.39.2