From 08266a6456cd980040ddbb887f52a1882e02e3c2 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 19 Dec 2005 09:14:33 +0000 Subject: [PATCH] Bug GVIEW10814 size of the cursor is not modified when changing the magnification Improve recognition of the outside and inside picking cursor parameters --- src/OBJECT/VISU_GaussPtsAct.cxx | 28 +++++++++++++--------------- src/OBJECT/VISU_GaussPtsAct.h | 6 ++++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 18ea5f9d..42156e20 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -401,7 +401,8 @@ namespace float VISU_GaussPtsAct -::GetRadius(vtkIdType theVTKID, +::GetRadius(vtkIdType theObjID, + vtkIdType theVTKID, vtkDataArray *theScalarArray) { return ::GetRadius(theVTKID,theScalarArray,myDeviceActor->GetPipeLine()); @@ -412,7 +413,7 @@ float VISU_GaussPtsAct ::GetMagnification(vtkIdType theObjID) { - return GetGaussPointsPL()->GetMagnification(); + return myDeviceActor->GetPipeLine()->GetMagnification(); } @@ -434,7 +435,7 @@ float VISU_GaussPtsAct ::GetClamp(vtkIdType theObjID) { - return ::GetClamp(GetGaussPointsPL()); + return ::GetClamp(myDeviceActor->GetPipeLine()); } @@ -663,8 +664,8 @@ VISU_GaussPtsAct myCursorPyramid->Init(aPyramidHeight, myPickingSettings->GetCursorSize(), - GetRadius(aVtkId,aScalarArray), - GetMagnification(aVtkId), + GetRadius(anObjId,aVtkId,aScalarArray), + GetMagnification(anObjId), GetClamp(anObjId), aNodeCoord, aColor); @@ -873,8 +874,8 @@ VISU_GaussPtsAct aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize(); myCursorPyramidSelected->Init(aPyramidHeight, myPickingSettings->GetCursorSize(), - GetRadius(aVtkId,aScalarArray), - GetMagnification(aVtkId), + GetRadius(anObjId,aVtkId,aScalarArray), + GetMagnification(anObjId), GetClamp(anObjId), aNodeCoord, myHighlightActor->GetProperty()->GetColor()); @@ -1154,10 +1155,6 @@ VISU_GaussPtsAct1 myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(theWidgetCtrl->ImplicitFunction()); myOutsideDeviceActor->SetVisibility(GetVisibility() && theWidgetCtrl->GetEnabled()); - - if (theWidgetCtrl->GetEnabled()) { - myCurrentPL = myInsideDeviceActor->GetPipeLine(); - } } Superclass::SetWidgetCtrl(theWidgetCtrl); @@ -1192,12 +1189,13 @@ VISU_GaussPtsAct1 //---------------------------------------------------------------------------- float VISU_GaussPtsAct1 -::GetRadius(vtkIdType theVTKID, +::GetRadius(vtkIdType theObjID, + vtkIdType theVTKID, vtkDataArray *theScalarArray) { VISU_GaussPointsPL* aPipeLine = myDeviceActor->GetPipeLine(); if(myWidgetCtrl && myWidgetCtrl->GetEnabled()){ - if(myInsideDeviceActor->GetPipeLine()->GetElemObjID(theVTKID) < 0) + if(myInsideDeviceActor->GetPipeLine()->GetNodeVTKID(theObjID) < 0) aPipeLine = myOutsideDeviceActor->GetPipeLine(); else aPipeLine = myInsideDeviceActor->GetPipeLine(); @@ -1213,7 +1211,7 @@ VISU_GaussPtsAct1 { VISU_GaussPointsPL* aPipeLine = myDeviceActor->GetPipeLine(); if(myWidgetCtrl && myWidgetCtrl->GetEnabled()){ - if(myInsideDeviceActor->GetPipeLine()->GetElemVTKID(theObjID) < 0) + if(myInsideDeviceActor->GetPipeLine()->GetNodeVTKID(theObjID) < 0) aPipeLine = myOutsideDeviceActor->GetPipeLine(); else aPipeLine = myInsideDeviceActor->GetPipeLine(); @@ -1228,7 +1226,7 @@ VISU_GaussPtsAct1 ::GetClamp(vtkIdType theObjID) { if(myWidgetCtrl && myWidgetCtrl->GetEnabled()){ - if(myInsideDeviceActor->GetPipeLine()->GetElemVTKID(theObjID) < 0) + if(myInsideDeviceActor->GetPipeLine()->GetNodeVTKID(theObjID) < 0) return ::GetClamp(myOutsideDeviceActor->GetPipeLine()); else return ::GetClamp(myInsideDeviceActor->GetPipeLine()); diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index eba81b9b..3b8a81e6 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -244,7 +244,8 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor //! To get current value of the radius of the Point Sprite virtual float - GetRadius(vtkIdType theVTKID, + GetRadius(vtkIdType theObjID, + vtkIdType theVTKID, vtkDataArray *theScalarArray); //! To get current value of the magnification @@ -382,7 +383,8 @@ class VTKOCC_EXPORT VISU_GaussPtsAct1 : public VISU_GaussPtsAct //! To get current value of the radius of the Point Sprite virtual float - GetRadius(vtkIdType theVTKID, + GetRadius(vtkIdType theObjID, + vtkIdType theVTKID, vtkDataArray *theScalarArray); //! To get current value of the magnification -- 2.39.2