]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Merge from BR_Dev_For_6_3_1 03/06/2011 V6_3_BR_20110607 V6_3_BR_20110608 mergefrom_BR_Dev_For_6_3_1_03Jun11 mergeto_V6_main_06Jun11
authorvsr <vsr@opencascade.com>
Fri, 3 Jun 2011 09:55:41 +0000 (09:55 +0000)
committervsr <vsr@opencascade.com>
Fri, 3 Jun 2011 09:55:41 +0000 (09:55 +0000)
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_Actor.h
src/PIPELINE/Makefile.am
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_StreamLinesPL.hxx
src/PIPELINE/VISU_Streamer.cxx
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx
src/VISUGUI/VisuGUI_SizeBox.cxx

index 0b76193f005334a063af20cf75118fe86c22e5b7..dc25a52b1f1c9d5e75be015769a264a77dc0e954 100644 (file)
@@ -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() );
   }
index b8be8ba8ff927a8f8d0272e329516f7f2aa5c574..4ea21ad6a3beedb02cd0ce39230aac0f7d67d733 100644 (file)
@@ -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;
 };
index ff61792af0d53cf13b07b731b452aceb107afa00..ab75c0602cf362898e2e905cb575a7b42860de47 100644 (file)
@@ -44,8 +44,6 @@ salomeinclude_HEADERS= \
        VISU_IsoSurfacesPL.hxx \
        VISU_DeformedShapePL.hxx \
        VISU_VectorsPL.hxx \
-       VISU_Streamer.hxx \
-       VISU_StreamLine.hxx \
        VISU_StreamLinesPL.hxx \
        VISU_LookupTable.hxx \
        VISU_ScalarBarActor.hxx \
@@ -93,8 +91,6 @@ dist_libVisuPipeLine_la_SOURCES= \
        VISU_IsoSurfacesPL.cxx \
        VISU_DeformedShapePL.cxx \
        VISU_VectorsPL.cxx \
-       VISU_Streamer.cxx \
-       VISU_StreamLine.cxx \
        VISU_StreamLinesPL.cxx \
        VISU_LookupTable.cxx \
        VISU_ScalarBarActor.cxx \
index 5eec0b295ceca0da3a32bea47c4c6095993a9517..1c6632f68a62e80df96082e1b9ae74838451658f 100644 (file)
@@ -32,7 +32,6 @@
 //#include "VISU_UsedPointsFilter.hxx"
 #include "VISU_MaskPointsFilter.hxx"
 #include "VISU_PipeLineUtils.hxx"
-#include "VISU_StreamLine.hxx"
 
 #include "VTKViewer_CellCenters.h"
 #include "VTKViewer_GeometryFilter.h"
@@ -44,6 +43,7 @@
 
 #include <vtkCell.h>
 #include <vtkDataSet.h>
+#include <vtkStreamLine.h>
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -68,7 +68,7 @@ VISU_StreamLinesPL
   SetIsShrinkable(false);
   SetIsFeatureEdgesAllowed(false);
 
-  myStream = VISU_StreamLine::New();
+  myStream = vtkStreamLine::New();
   myCenters = VTKViewer_CellCenters::New();
   myGeomFilter = VTKViewer_GeometryFilter::New();
   myPointsFilter = VISU_MaskPointsFilter::New();
index 94db215145d27886b9d8ef07eb4574c0a4372419..6438ad2680713645002394916f1306d82dda11c2 100644 (file)
@@ -38,7 +38,7 @@ class vtkPointSet;
 class VTKViewer_CellCenters;
 class VTKViewer_GeometryFilter;
 class VISU_MaskPointsFilter;
-class VISU_StreamLine;
+class vtkStreamLine;
 
 
 //----------------------------------------------------------------------------
@@ -247,7 +247,7 @@ protected:
   vtkFloatingPointType
   GetUsedPointsDefault();
 
-  VISU_StreamLine* myStream;
+  vtkStreamLine* myStream;
   vtkPointSet* mySource;
   VTKViewer_CellCenters* myCenters;
   VTKViewer_GeometryFilter *myGeomFilter;
index 4b71e409a5df9387b3f574f9323e913cbfe93398..3efd1aeb2ee8b1c8eb32c88ae2a8dc7d52a25f6e 100644 (file)
@@ -91,7 +91,7 @@ VISU_Streamer::~VISU_Streamer()
 {
 }
 
-static const double VTK_EPSILON=1E-7;
+static const double VTK_EPSILON=1E-12;
 
 VTK_THREAD_RETURN_TYPE VISU_Streamer::ThreadedIntegrate( void *arg )
 {
index 68a09cf6d1b8e55445c9df5e6a39fe94fce11c72..e1aad77a237edcd0f9462719ac38e432c7a1dcdc 100644 (file)
@@ -432,8 +432,8 @@ void VisuGUI_Module::createPreferences()
   VisuGUI::createPreferences();
 
   createGaussPointsPreferences();
-  createInsideCursorPreferences();
-  createOutsideCursorPreferences();
+  //createInsideCursorPreferences();
+  //createOutsideCursorPreferences();
   createPickingPreferences();
   // createSpaceMousePreferences();
   //createRecorderPreferences();
index a9ecb7364a9db57127ca057d2d53db5acd9f6b87..741fa36052897c40239e51f7c96201e49ce6cef4 100644 (file)
@@ -230,7 +230,8 @@ void VisuGUI_SelectionPrefDlg::update()
                                             ( int )( aColor[2] * 255.0 ) ) );
 
   myInfoWindowGroup->setChecked( aPickingSettings->GetInfoWindowEnabled() );
-  myTransparencySpinBox->setValue( int(aPickingSettings->GetInfoWindowTransparency() * 100.0) );
+  vtkFloatingPointType transparency = aPickingSettings->GetInfoWindowTransparency() * 100.0;
+  myTransparencySpinBox->setValue( (int) transparency );
   myPositionComboBox->setCurrentIndex( aPickingSettings->GetInfoWindowPosition() );
   myCameraGroup->setChecked( aPickingSettings->GetCameraMovementEnabled() );
   myZoomFactorSpinBox->setValue( aPickingSettings->GetZoomFactor() );
index 87c9604bbd197e4dbce1051da2838c2fea0877e0..eb01fe980828994488e9464cab348168cf438c55 100644 (file)
@@ -276,7 +276,8 @@ float VisuGUI_SizeBox::getOutsideSize() const
 
 void VisuGUI_SizeBox::setOutsideSize( float theOutsideSize )
 {
-  myOutsideSizeSpinBox->setValue( ( int )( theOutsideSize * 100 ) );
+  theOutsideSize*=100.;
+  myOutsideSizeSpinBox->setValue( ( int ) theOutsideSize );
 }
 
 float VisuGUI_SizeBox::getGeomSize() const
@@ -286,7 +287,8 @@ float VisuGUI_SizeBox::getGeomSize() const
 
 void VisuGUI_SizeBox::setGeomSize( float theGeomSize )
 {
-  myGeomSizeSpinBox->setValue( ( int )( theGeomSize * 100 ) );
+  theGeomSize*=100.;
+  myGeomSizeSpinBox->setValue( ( int ) theGeomSize );
 }
 
 float VisuGUI_SizeBox::getMinSize() const
@@ -296,7 +298,8 @@ float VisuGUI_SizeBox::getMinSize() const
 
 void VisuGUI_SizeBox::setMinSize( float theMinSize )
 {
-  myMinSizeSpinBox->setValue( ( int )( theMinSize * 100 ) );
+  theMinSize*=100.;
+  myMinSizeSpinBox->setValue( ( int ) theMinSize );
 }
 
 float VisuGUI_SizeBox::getMaxSize() const
@@ -306,7 +309,8 @@ float VisuGUI_SizeBox::getMaxSize() const
 
 void VisuGUI_SizeBox::setMaxSize( float theMaxSize )
 {
-  myMaxSizeSpinBox->setValue( ( int )( theMaxSize * 100 ) );
+  theMaxSize*=100.;
+  myMaxSizeSpinBox->setValue( (int) theMaxSize );
 }
 
 float VisuGUI_SizeBox::getMagnification() const
@@ -316,7 +320,8 @@ float VisuGUI_SizeBox::getMagnification() const
 
 void VisuGUI_SizeBox::setMagnification( float theMagnification )
 {
-  myMagnificationSpinBox->setValue( ( int )( theMagnification * 100 ) );
+  theMagnification*=100.;
+  myMagnificationSpinBox->setValue( (int) theMagnification );
 }
 
 float VisuGUI_SizeBox::getIncrement() const