From 68a66176cbd656f5b5d307edc89dcfd61d13bda2 Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 1 Jun 2011 14:28:51 +0000 Subject: [PATCH] Issue 0021277: EDF 1865 VISU: Scalar map + use only groups + values labeling --- src/OBJECT/VISU_Actor.cxx | 10 +++++++++- src/OBJECT/VISU_Actor.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/OBJECT/VISU_Actor.cxx b/src/OBJECT/VISU_Actor.cxx index 2e8e3a23..0393c50e 100644 --- a/src/OBJECT/VISU_Actor.cxx +++ b/src/OBJECT/VISU_Actor.cxx @@ -33,6 +33,7 @@ #include "VISU_SelectVisiblePoints.h" #include "VISU_PipeLine.hxx" +#include "VISU_UsedPointsFilter.hxx" #include "SVTK_Actor.h" #include "SVTK_Event.h" @@ -165,6 +166,9 @@ VISU_Actor myValCellCenters = VTKViewer_CellCenters::New(); myValCellCenters->SetInput(myValLblDataSet); + myValUsedPoints = VISU_UsedPointsFilter::New(); + myValUsedPoints->SetInput(myValLblDataSet); + myValMaskPoints = vtkMaskPoints::New(); myValMaskPoints->SetInput(myValCellCenters->GetOutput()); myValMaskPoints->SetOnRatio(1); @@ -260,6 +264,7 @@ VISU_Actor myValLabeledDataMapper->Delete(); myValSelectVisiblePoints->Delete(); myValMaskPoints->Delete(); + myValUsedPoints->Delete(); myValCellCenters->Delete(); myValLabels->Delete(); @@ -1278,7 +1283,10 @@ void VISU_Actor::SetValuesLabeled( const bool theIsValLabeled ) myValMaskPoints->SetInput( myValCellCenters->GetOutput() ); } else if ( isOnPnt ) - myValMaskPoints->SetInput( aDataSet ); + { + myValUsedPoints->SetInput( aDataSet ); + myValMaskPoints->SetInput( myValUsedPoints->GetOutput() ); + } myValLabels->SetVisibility( GetVisibility() ); } diff --git a/src/OBJECT/VISU_Actor.h b/src/OBJECT/VISU_Actor.h index 7479d517..5e765088 100644 --- a/src/OBJECT/VISU_Actor.h +++ b/src/OBJECT/VISU_Actor.h @@ -59,6 +59,7 @@ class VTKViewer_CellCenters; class VTKViewer_FramedTextActor; class VISU_SelectVisiblePoints; +class VISU_UsedPointsFilter; #if !defined(VTK_XVERSION) #define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION) @@ -417,6 +418,7 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase vtkActor2D* myValLabels; vtkMaskPoints* myValMaskPoints; VTKViewer_CellCenters* myValCellCenters; + VISU_UsedPointsFilter* myValUsedPoints; vtkLabeledDataMapper* myValLabeledDataMapper; VISU_SelectVisiblePoints* myValSelectVisiblePoints; }; -- 2.39.2