From: imn Date: Fri, 17 Apr 2015 08:01:36 +0000 (+0300) Subject: INT PAL 0052682: Local selection for ball elements has incorrect size X-Git-Tag: V7_6_0rc1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9008062cc57e7215f5846bc9aad60949cb3e3347;p=modules%2Fgui.git INT PAL 0052682: Local selection for ball elements has incorrect size --- diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index d1cb76843..4f83e9c70 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -704,6 +704,13 @@ double SVTK_DeviceActor::GetQuadraticArcAngle(){ void SVTK_DeviceActor::SetBallEnabled( bool theBallEnabled ) { myMapper->SetBallEnabled( theBallEnabled ); } +/*! + * Set ball scale factor + * \param theBallScale double value a scale factor of ball element + */ +void SVTK_DeviceActor::SetBallScale( double theBallScale ) { + myMapper->SetBallScale( theBallScale ); +} /*! * Set point marker enabled diff --git a/src/SVTK/SVTK_DeviceActor.h b/src/SVTK/SVTK_DeviceActor.h index a9d7b332a..d9471c8c9 100644 --- a/src/SVTK/SVTK_DeviceActor.h +++ b/src/SVTK/SVTK_DeviceActor.h @@ -222,6 +222,9 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor void SetMarkerEnabled( bool ); + void + SetBallScale( double ); + void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale ); diff --git a/src/VTKViewer/VTKViewer_DataSetMapper.cxx b/src/VTKViewer/VTKViewer_DataSetMapper.cxx index aac2f9279..0a075827a 100644 --- a/src/VTKViewer/VTKViewer_DataSetMapper.cxx +++ b/src/VTKViewer/VTKViewer_DataSetMapper.cxx @@ -30,6 +30,7 @@ VTKViewer_DataSetMapper::VTKViewer_DataSetMapper() { this->MarkerEnabled = false; this->BallEnabled = false; + this->BallScale = 1; this->MarkerType = VTK::MT_NONE; this->MarkerScale = VTK::MS_NONE; this->MarkerId = 0; @@ -56,6 +57,7 @@ void VTKViewer_DataSetMapper::Render(vtkRenderer *ren, vtkActor *act) else pm->SetMarkerTexture( this->MarkerId, this->MarkerTexture ); pm->SetBallEnabled( this->BallEnabled ); + pm->SetBallScale( this->BallScale ); this->GeometryExtractor = gf; this->PolyDataMapper = pm; @@ -82,6 +84,14 @@ void VTKViewer_DataSetMapper::SetBallEnabled( bool theBallEnabled ) aMapper->SetBallEnabled( theBallEnabled ); } +//----------------------------------------------------------------------------- +void VTKViewer_DataSetMapper::SetBallScale( double theBallScale ) +{ + this->BallScale = theBallScale; + if( this->PolyDataMapper ) + if( VTKViewer_PolyDataMapper* aMapper = dynamic_cast( this->PolyDataMapper ) ) + aMapper->SetBallScale( theBallScale ); +} //---------------------------------------------------------------------------- void VTKViewer_DataSetMapper::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale ) diff --git a/src/VTKViewer/VTKViewer_DataSetMapper.h b/src/VTKViewer/VTKViewer_DataSetMapper.h index c333ee540..f206d46ef 100644 --- a/src/VTKViewer/VTKViewer_DataSetMapper.h +++ b/src/VTKViewer/VTKViewer_DataSetMapper.h @@ -33,8 +33,13 @@ public: //! Set point marker enabled void SetMarkerEnabled( bool ); + + //! Set ball element enabled void SetBallEnabled( bool ); - + + //! Set ball element scale factor + void SetBallScale( double ); + //! Set standard point marker void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale ); @@ -64,6 +69,7 @@ private: private: bool MarkerEnabled; bool BallEnabled; + double BallScale; VTK::MarkerType MarkerType; VTK::MarkerScale MarkerScale; int MarkerId;