37 #include "vtkCallbackCommand.h"
38 #include "vtkRenderer.h"
44 mName(name), mUid(uid)
47 this->mCallbackCommand = vtkCallbackCommandPtr::New();
48 this->mCallbackCommand->SetClientData(
this);
49 this->mCallbackCommand->SetCallback(RepImpl::ProcessEvents);
73 return this->
getView()==theView;
81 renderer->AddObserver(vtkCommand::StartEvent, this->mCallbackCommand, 1.0);
91 renderer->RemoveObserver(this->mCallbackCommand);
99 os << indent <<
"mUid: " << mUid << std::endl;
100 os << indent <<
"mName: " << mName << std::endl;
101 os << indent <<
"Type: " <<
getType() << std::endl;
113 return this->
getView()->getRenderer();
117 void RepImpl::ProcessEvents(vtkObject* vtkNotUsed(
object),
unsigned long event,
void* clientdata,
118 void* vtkNotUsed(calldata))
121 self->onStartRenderPrivate();
124 void RepImpl::onStartRenderPrivate()
136 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