#include <IRoCSChannelSpecsOpenGlRenderingViewRenderer.hh>
◆ IRoCSChannelSpecsOpenGlRenderingViewRenderer()
◆ ~IRoCSChannelSpecsOpenGlRenderingViewRenderer()
IRoCSChannelSpecsOpenGlRenderingViewRenderer::~IRoCSChannelSpecsOpenGlRenderingViewRenderer |
( |
| ) |
|
◆ render()
void IRoCSChannelSpecsOpenGlRenderingViewRenderer::render |
( |
QPainter * |
painter = NULL | ) |
const |
|
virtual |
Main rendering routine which is called whenever a paintEvent() on the ViewWidget occurs.
Within this function the actual rendering of the associated channel into the associated view is performed. This may imply to use the passed QPainter but may be also done by other means as e.g. by directly imposing OpenGL commands. This function must be re-implemented and should be as fast as possible since it is called at every widget repaint
- Parameters
-
painter | The active QPainter or NULL if no painter is currently active or the view update is not QPainter-based, like e.g. for OpenGL rendering |
Implements ChannelSpecsRenderer.
◆ axisGeometry()
◆ boundaryGeometry()
atb::SurfaceGeometry const& IRoCSChannelSpecsOpenGlRenderingViewRenderer::boundaryGeometry |
( |
| ) |
const |
◆ updateCache()
void IRoCSChannelSpecsOpenGlRenderingViewRenderer::updateCache |
( |
| ) |
const |
|
virtual |
Update the rendering cache.
This function is called by the associated ChannelSpecs if its content changes or by the ViewWidget if the ViewPosition changes such that an cache update might be neccessary. Reimplement this function if you have expensive computations that should not be done at every repaint. The default implementation only calls the update() function of the view. You can disable the cacheUpdates using the setCacheUpdatesEnabled() function. This is important if you programmatically perform many operations on the ChannelSpecs, of which each would need a cache update. After the sequence of operations, you have to call updateCache() explicitely to apply the changes. After cache update update() of the view is called to visualize the changes. So if many channels are involved you should call setUpdatesEnabled(false) to the view before these changes.
Reimplemented from ChannelSpecsRenderer.
◆ channel()
◆ view()
◆ cacheUpdatesEnabled()
bool ChannelSpecsRenderer::cacheUpdatesEnabled |
( |
| ) |
const |
|
inherited |
Check whether cache updates are enabled.
- Returns
- true if the cache is updated by changes in channel or view false otherwise
- See also
- setCacheUpdatesEnabled(bool)
◆ event()
virtual bool ChannelSpecsRenderer::event |
( |
QEvent * |
event | ) |
|
|
virtualinherited |
Interprets and distributes the given event.
This function checks, whether the event is a UserInteractionEvent and if so passes the event to the specialized function userInteractionEvent(UserInteractionEvent*). If you want to enable mouse interaction with the view associated with this renderer you should reimplement the specialized function, for everything beyond mouse interaction reimplement this function.
- Parameters
-
- Returns
- true if the event was accepted, false otherwise
◆ setCacheUpdatesEnabled
virtual void ChannelSpecsRenderer::setCacheUpdatesEnabled |
( |
bool |
enable | ) |
|
|
virtualslotinherited |
Enables or disables the updates of the rendering cache.
This usually means that changes in the ChannelSpecs or the view position don't lead to an update of the view. This is useful, if you have to programmatically perform many small operations on the channel of which not each should trigger a repaint.
- Parameters
-
enable | true to enable, false to disable cache updates |
◆ userInteractionEvent()
|
protectedvirtualinherited |
◆ p_channel
◆ p_view
◆ _cacheUpdatesEnabled
bool ChannelSpecsRenderer::_cacheUpdatesEnabled |
|
protectedinherited |
The documentation for this class was generated from the following file: