From 75ee52178ff01e4d55c482fd07af583ee1c6890a Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 17 Nov 2005 13:22:55 +0000 Subject: [PATCH] VVTK_Renderer now has it's own prehighlight and highlight properties, which are setting to Gauss Point actors. --- src/VVTK/VVTK_Renderer.cxx | 28 ++++++++++++++++++++-------- src/VVTK/VVTK_Renderer.h | 3 +++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/VVTK/VVTK_Renderer.cxx b/src/VVTK/VVTK_Renderer.cxx index 1502efa1..12ef67bb 100644 --- a/src/VVTK/VVTK_Renderer.cxx +++ b/src/VVTK/VVTK_Renderer.cxx @@ -140,7 +140,9 @@ VVTK_Renderer ::VVTK_Renderer(): myFPSActor(VISU_FPSActor::New()), myPickingSettings(NULL), - myGaussPointPicker(vtkPointPicker::New()) + myGaussPointPicker(vtkPointPicker::New()), + myGaussPreHighlightProperty(vtkProperty::New()), + myGaussHighlightProperty(vtkProperty::New()) { if(MYDEBUG) INFOS("VVTK_Renderer() - "<SetMapper(aTextMapper); aTextMapper->Delete(); + GetDevice()->AddActor2D(myFPSActor.GetPointer()); + myGaussPointPicker->Delete(); - GetDevice()->AddActor2D(myFPSActor.GetPointer()); + myGaussPreHighlightProperty->Delete(); + myGaussPreHighlightProperty->SetColor(0,1,1); + + myGaussHighlightProperty->Delete(); + myGaussHighlightProperty->SetColor(1,1,0); + } VVTK_Renderer @@ -177,9 +186,11 @@ VVTK_Renderer { Superclass::AddActor(theActor); if(VISU_GaussPtsAct* anActor = dynamic_cast(theActor)){ - anActor->SetPickingSettings(myPickingSettings); - anActor->SetPointPicker(myGaussPointPicker.GetPointer()); + anActor->SetPreHighlightProperty(myGaussPreHighlightProperty.GetPointer()); + anActor->SetHighlightProperty(myGaussHighlightProperty.GetPointer()); + + anActor->SetPickingSettings(myPickingSettings); } } @@ -189,11 +200,12 @@ VVTK_Renderer ::RemoveActor(VTKViewer_Actor* theActor) { Superclass::RemoveActor(theActor); - using namespace VISU; - if(VISU_GaussPtsAct1* anActor = dynamic_cast(theActor)){ - anActor->SetPickingSettings(NULL); - + if(VISU_GaussPtsAct* anActor = dynamic_cast(theActor)){ anActor->SetPointPicker(NULL); + anActor->SetPreHighlightProperty(NULL); + anActor->SetHighlightProperty(NULL); + + anActor->SetPickingSettings(NULL); } } diff --git a/src/VVTK/VVTK_Renderer.h b/src/VVTK/VVTK_Renderer.h index bcfc31ac..17db3c87 100644 --- a/src/VVTK/VVTK_Renderer.h +++ b/src/VVTK/VVTK_Renderer.h @@ -72,7 +72,10 @@ class VVTK_EXPORT VVTK_Renderer : public SVTK_Renderer VISU_PickingSettings* myPickingSettings; //! Keeps reference of the VISU_PickingSettings vtkSmartPointer myFPSActor; //!< To show FPS of the rendering at run-time + vtkSmartPointer myGaussPointPicker; + vtkSmartPointer myGaussPreHighlightProperty; + vtkSmartPointer myGaussHighlightProperty; }; -- 2.39.2