From 874d3cfbddae652a2a4fed7c8956bf5a3f0978bf Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 13 Dec 2010 09:12:47 +0000 Subject: [PATCH] Additional fix for the bug IPAL21936 bounding box does not account real size of object. --- src/OBJECT/VISU_ActorBase.cxx | 5 +++++ src/OBJECT/VISU_ActorBase.h | 6 ++++++ src/OBJECT/VISU_VectorsAct.cxx | 5 +++++ src/OBJECT/VISU_VectorsAct.h | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/src/OBJECT/VISU_ActorBase.cxx b/src/OBJECT/VISU_ActorBase.cxx index ae6c8e9d..387f9cfa 100644 --- a/src/OBJECT/VISU_ActorBase.cxx +++ b/src/OBJECT/VISU_ActorBase.cxx @@ -178,3 +178,8 @@ void VISU_ActorBase::ConnectToFactory(boost::signal0& theUpdateActorSignal myUpdateActorsConnection = theUpdateActorSignal.connect(boost::bind(&VISU_ActorBase::UpdateFromFactory,this)); myRemoveFromRendererConnection = theRemoveFromRendererSignal.connect(boost::bind(&VISU_ActorBase::RemoveFromRender,this)); } + +//-------------------------------------------------------------------------------------- +vtkDataSet* VISU_ActorBase::GetHighlightedDataSet() { + return myPassFilter.back()->GetOutput(); +} diff --git a/src/OBJECT/VISU_ActorBase.h b/src/OBJECT/VISU_ActorBase.h index 10645c40..c95d2da9 100644 --- a/src/OBJECT/VISU_ActorBase.h +++ b/src/OBJECT/VISU_ActorBase.h @@ -72,6 +72,12 @@ class VISU_OBJECT_EXPORT VISU_ActorBase: public SALOME_Actor, virtual void ConnectToFactory(boost::signal0& , boost::signal0&); + //---------------------------------------------------------------------------- + //! Return pointer to the dataset, which used to calculation of the bounding box of the actor + //! Redefined from VTKViewer_Actor + virtual vtkDataSet* GetHighlightedDataSet(); + + protected: VISU_ActorBase(); virtual ~VISU_ActorBase(); diff --git a/src/OBJECT/VISU_VectorsAct.cxx b/src/OBJECT/VISU_VectorsAct.cxx index a2e866ba..9b2ee148 100644 --- a/src/OBJECT/VISU_VectorsAct.cxx +++ b/src/OBJECT/VISU_VectorsAct.cxx @@ -143,3 +143,8 @@ VISU_VectorsAct return Superclass::GetValLabelsInput(); } + +//-------------------------------------------------------------------------------------- +vtkDataSet* VISU_VectorsAct::GetHighlightedDataSet() { + return myPassFilter[3]->GetOutput(); +} diff --git a/src/OBJECT/VISU_VectorsAct.h b/src/OBJECT/VISU_VectorsAct.h index 2729a683..b6e533e1 100644 --- a/src/OBJECT/VISU_VectorsAct.h +++ b/src/OBJECT/VISU_VectorsAct.h @@ -69,6 +69,12 @@ class VISU_OBJECT_EXPORT VISU_VectorsAct : public VISU_ScalarMapAct virtual vtkDataSet* GetValLabelsInput(); + + //---------------------------------------------------------------------------- + //! Return pointer to the dataset, which used to calculation of the bounding box of the actor + //! Redefined from VTKViewer_Actor + virtual vtkDataSet* GetHighlightedDataSet(); + protected: VISU_VectorsAct(); -- 2.39.2