return myPrs3d;
}
-void
-VISU_Actor
-::RemoveFromRender()
-{
- RemoveFromRender(GetRenderer());
-}
-
//----------------------------------------------------------------------------
void
VISU_Actor
void
SetPrs3d(VISU::Prs3d_i* thePrs3d);
- virtual
- void
- RemoveFromRender();
-
//----------------------------------------------------------------------------
virtual
VISU_PipeLine*
VISU_ActorBase
::~VISU_ActorBase()
{
-
+ myUpdateActorsConnection.disconnect();
+ myRemoveFromRendererConnection.disconnect();
}
//----------------------------------------------------------------------------
{
return myIsShrinkable;
}
+
+//--------------------------------------------------------------------------------------
+
+void VISU_ActorBase::RemoveFromRender(vtkRenderer* theRenderer)
+{
+ Superclass::RemoveFromRender(theRenderer);
+}
+
+void VISU_ActorBase::RemoveFromRender()
+{
+ RemoveFromRender(GetRenderer());
+}
+
+void VISU_ActorBase::ConnectToFactory(boost::signal0<void>& theUpdateActorSignal, boost::signal0<void>& theRemoveFromRendererSignal)
+{
+ myUpdateActorsConnection = theUpdateActorSignal.connect(boost::bind(&VISU_ActorBase::UpdateFromFactory,this));
+ myRemoveFromRendererConnection = theRemoveFromRendererSignal.connect(boost::bind(&VISU_ActorBase::RemoveFromRender,this));
+}
#include "VISU_OBJECT.h"
#include "SALOME_Actor.h"
#include "VISU_BoostSignals.h"
+#include <boost/bind.hpp>
class VTKViewer_ShrinkFilter;
virtual void SetRepresentation(int theMode);
+ virtual void RemoveFromRender(vtkRenderer* theRenderer);
+ virtual void RemoveFromRender();
+
+ virtual void ConnectToFactory(boost::signal0<void>& , boost::signal0<void>&);
+
protected:
VISU_ActorBase();
virtual ~VISU_ActorBase();
vtkTimeStamp myUpdateFromFactoryTime;
boost::signal1<void,VISU_ActorBase*> myDestroySignal;
+ boost::signalslib::connection myUpdateActorsConnection;
+ boost::signalslib::connection myRemoveFromRendererConnection;
+
vtkSmartPointer<VTKViewer_ShrinkFilter> myShrinkFilter;
bool myIsShrinkable;
}
theActor->SetFactory(this);
- myUpdateActorsSignal.connect(boost::bind(&VISU_Actor::UpdateFromFactory,theActor));
- myRemoveActorsFromRendererSignal.connect(boost::bind(&VISU_Actor::RemoveFromRender,theActor));
+ theActor->ConnectToFactory(myUpdateActorsSignal, myRemoveActorsFromRendererSignal);
myActorCollection->AddItem(theActor);
theActor->Delete();