16 #include "vtkCallbackCommand.h" 17 #include "vtkRenderer.h" 23 mName(name), mUid(uid)
26 this->mCallbackCommand = vtkCallbackCommandPtr::New();
27 this->mCallbackCommand->SetClientData(
this);
28 this->mCallbackCommand->SetCallback(RepImpl::ProcessEvents);
52 return this->
getView()==theView;
60 renderer->AddObserver(vtkCommand::StartEvent, this->mCallbackCommand, 1.0);
70 renderer->RemoveObserver(this->mCallbackCommand);
78 os << indent <<
"mUid: " << mUid << std::endl;
79 os << indent <<
"mName: " << mName << std::endl;
80 os << indent <<
"Type: " <<
getType() << std::endl;
92 return this->
getView()->getRenderer();
96 void RepImpl::ProcessEvents(vtkObject* vtkNotUsed(
object),
unsigned long event,
void* clientdata,
97 void* vtkNotUsed(calldata))
100 self->onStartRenderPrivate();
101 self->onEveryRender();
104 void RepImpl::onStartRenderPrivate()
116 this->
getView()->setModified();
void setName(QString name)
vtkRendererPtr getRenderer()
RepImpl(const QString &uid="", const QString &name="")
virtual QString getType() const =0
virtual void removeRepActorsFromViewRenderer(ViewPtr view)=0
virtual void connectToView(ViewPtr theView)
boost::shared_ptr< class View > ViewPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
virtual void disconnectFromView(ViewPtr theView)
Formatting class for debug printing of the ssc library.
virtual void printSelf(std::ostream &os, Indent indent)
Default implementation of Rep.
virtual void onModifiedStartRender()
virtual void addRepActorsToViewRenderer(ViewPtr view)=0
virtual bool isConnectedToView(ViewPtr theView) const
Namespace for all CustusX production code.