|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
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)
Namespace for all CustusX production code.
vtkRendererPtr getRenderer()
virtual void addRepActorsToViewRenderer(ViewPtr view)=0
virtual void disconnectFromView(ViewPtr theView)
virtual bool isConnectedToView(ViewPtr theView) const
boost::shared_ptr< class View > ViewPtr
virtual void removeRepActorsFromViewRenderer(ViewPtr view)=0
Default implementation of Rep.
virtual void onModifiedStartRender()
RepImpl(const QString &uid="", const QString &name="")
virtual QString getType() const =0
Formatting class for debug printing of the ssc library.
virtual void printSelf(std::ostream &os, Indent indent)
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
virtual void connectToView(ViewPtr theView)