NorMIT-nav
22.09
An IGT application
|
Base class for listening to a vtkRenderer. More...
#include <cxViewportListener.h>
Public Member Functions | |
ViewportListenerBase () | |
virtual | ~ViewportListenerBase () |
void | startListen (vtkRendererPtr renderer) |
void | stopListen () |
bool | isListening () const |
void | setCallback (boost::function< void()> func) |
virtual void | callback () |
double | getVpnZoom () |
double | getVpnZoom (Vector3D focalPoint) |
ViewportListenerBase::getVpnZoom Calculate the size of a 1mm line at the focal point projected into the normalized viewport space. This method uses a given point as the focal point. More... | |
Protected Types | |
typedef vtkSmartPointer< class ViewportObserverPrivate > | ViewportObserverPrivatePtr |
Protected Member Functions | |
virtual void | addObservers ()=0 |
virtual void | removeObservers ()=0 |
Protected Attributes | |
ViewportObserverPrivatePtr | mObserver |
vtkRendererPtr | mRenderer |
Base class for listening to a vtkRenderer.
Subclass by adding the observer to the mRenderer A callback function is called when a change is detected.
Definition at line 31 of file cxViewportListener.h.
|
protected |
Definition at line 50 of file cxViewportListener.h.
cx::ViewportListenerBase::ViewportListenerBase | ( | ) |
Definition at line 36 of file cxViewportListener.cpp.
|
virtual |
Definition at line 41 of file cxViewportListener.cpp.
|
protectedpure virtual |
Implemented in cx::ViewportPreRenderListener, and cx::ViewportListener.
|
virtual |
Reimplemented in cx::ViewportPreRenderListener.
Definition at line 100 of file cxViewportListener.cpp.
double cx::ViewportListenerBase::getVpnZoom | ( | ) |
Calculate the size of a 1mm line at the focal point projected into the normalized viewport space. This method uses the current default focal point of the camera
Definition at line 110 of file cxViewportListener.cpp.
double cx::ViewportListenerBase::getVpnZoom | ( | Vector3D | focalPoint | ) |
ViewportListenerBase::getVpnZoom Calculate the size of a 1mm line at the focal point projected into the normalized viewport space. This method uses a given point as the focal point.
focalPoint |
Definition at line 125 of file cxViewportListener.cpp.
bool cx::ViewportListenerBase::isListening | ( | ) | const |
Definition at line 90 of file cxViewportListener.cpp.
|
protectedpure virtual |
Implemented in cx::ViewportPreRenderListener, and cx::ViewportListener.
void cx::ViewportListenerBase::setCallback | ( | boost::function< void()> | func | ) |
Definition at line 95 of file cxViewportListener.cpp.
void cx::ViewportListenerBase::startListen | ( | vtkRendererPtr | renderer | ) |
Definition at line 46 of file cxViewportListener.cpp.
void cx::ViewportListenerBase::stopListen | ( | ) |
Definition at line 66 of file cxViewportListener.cpp.
|
protected |
Definition at line 51 of file cxViewportListener.h.
|
protected |
Definition at line 52 of file cxViewportListener.h.