From e0b85847015c88e5e5a83c8918403c49776631db Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 16 Dec 2005 08:28:12 +0000 Subject: [PATCH] To introduce a new parameter for selection cursor - "cursor size" as it is mentioned in the Bug GVIEW10594 --- src/OBJECT/VISU_GaussPtsAct.cxx | 10 +++++++--- src/OBJECT/VISU_GaussPtsSettings.cxx | 1 + src/OBJECT/VISU_GaussPtsSettings.h | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 7260745c..052ee7ba 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -392,9 +392,13 @@ namespace float GetRadius(vtkIdType theVTKID, vtkDataArray *theScalarArray, - VISU_GaussPointsPL* theGaussPointsPL) + VISU_GaussPointsPL* theGaussPointsPL, + VISU_PickingSettings* thePickingSettings) { float aRadius = 0.5; + if(thePickingSettings && !thePickingSettings->GetInitial()){ + aRadius *= thePickingSettings->GetCursorSize(); + } if(theGaussPointsPL->GetPSMapper()->GetPointSpriteMode() == 1) // Geometry mode aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize(); else if(theGaussPointsPL->GetBicolor()){ @@ -416,7 +420,7 @@ VISU_GaussPtsAct ::GetRadius(vtkIdType theVTKID, vtkDataArray *theScalarArray) { - return ::GetRadius(theVTKID,theScalarArray,myDeviceActor->GetPipeLine()); + return ::GetRadius(theVTKID,theScalarArray,myDeviceActor->GetPipeLine(),myPickingSettings); } //---------------------------------------------------------------------------- @@ -1210,7 +1214,7 @@ VISU_GaussPtsAct1 else aPipeLine = myInsideDeviceActor->GetPipeLine(); } - return ::GetRadius(theVTKID,theScalarArray,aPipeLine); + return ::GetRadius(theVTKID,theScalarArray,aPipeLine,myPickingSettings); } diff --git a/src/OBJECT/VISU_GaussPtsSettings.cxx b/src/OBJECT/VISU_GaussPtsSettings.cxx index 296f39a3..b95b1627 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.cxx +++ b/src/OBJECT/VISU_GaussPtsSettings.cxx @@ -89,6 +89,7 @@ VISU_PickingSettings::VISU_PickingSettings() this->Initial = true; this->PyramidHeight = -1; + this->CursorSize = -1; this->PointTolerance = -1; this->Color[0] = -1; this->Color[1] = -1; diff --git a/src/OBJECT/VISU_GaussPtsSettings.h b/src/OBJECT/VISU_GaussPtsSettings.h index e9c7cd2e..1778521d 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.h +++ b/src/OBJECT/VISU_GaussPtsSettings.h @@ -189,6 +189,9 @@ class VISU_PickingSettings : public vtkObject vtkSetMacro( PyramidHeight, float ); vtkGetMacro( PyramidHeight, float ); + vtkSetMacro( CursorSize, float ); + vtkGetMacro( CursorSize, float ); + vtkSetVector3Macro( Color, float ); vtkGetVector3Macro( Color, float ); @@ -214,6 +217,7 @@ private: bool Initial; float PyramidHeight; + float CursorSize; float PointTolerance; float Color[3]; float InfoWindowTransparency; -- 2.39.2