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));
+}
#define VISU_ACTOR_BASE_H
#include "SALOME_Actor.h"
+#include <boost/bind.hpp>
#include "VISU_BoostSignals.h"
class VTKViewer_ShrinkFilter;
virtual bool IsShrunkable();
virtual bool IsShrunk();
virtual void SetShrinkable(bool theIsShrinkable);
-
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();