From: ouv Date: Wed, 1 Jun 2011 14:28:51 +0000 (+0000) Subject: Issue 0021277: EDF 1865 VISU: Scalar map + use only groups + values labeling X-Git-Tag: BR_Dev_For_6_3_1_20110602 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_Dev_For_6_3_1;p=modules%2Fvisu.git Issue 0021277: EDF 1865 VISU: Scalar map + use only groups + values labeling --- 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; };