X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVTKViewer%2FVTKViewer_DataSetMapper.cxx;h=9375a2f9d7354a05ebfd9331b087ec2e2a015830;hb=refs%2Fheads%2Fngr%2Fpython3_dev_pv5.4;hp=5d9888fa872bfc363ccfe7f57e4a09202c95de86;hpb=dd243976e72b27995de19643a438035581c25947;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_DataSetMapper.cxx b/src/VTKViewer/VTKViewer_DataSetMapper.cxx index 5d9888fa8..9375a2f9d 100644 --- a/src/VTKViewer/VTKViewer_DataSetMapper.cxx +++ b/src/VTKViewer/VTKViewer_DataSetMapper.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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 )