iRoCS Toolbox  1.1.0
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes
PointMarkerOpenGlRenderingViewRenderer Class Reference

#include <PointMarkerOpenGlRenderingViewRenderer.hh>

Inheritance diagram for PointMarkerOpenGlRenderingViewRenderer:
Collaboration diagram for PointMarkerOpenGlRenderingViewRenderer:

Public Slots

void setCacheUpdatesEnabled (bool enable)
 Enables or disables the updates of the rendering cache. More...
 
virtual void updateCache () const
 Update the rendering cache. More...
 

Public Member Functions

 PointMarkerOpenGlRenderingViewRenderer (PointMarker *marker, OpenGlRenderingViewWidget *view)
 
 PointMarkerOpenGlRenderingViewRenderer (PointMarkerOpenGlRenderingViewRenderer const &renderer)
 
 ~PointMarkerOpenGlRenderingViewRenderer ()
 
bool cacheUpdatesEnabled () const
 Check whether cache updates are enabled. More...
 
MarkerRendererclone () const
 
atb::SurfaceGeometry const & geometry () const
 
bool isDragging () const
 
Markermarker () const
 
void render (QPainter *painter=NULL) const
 Main rendering routine which is called whenever a paintEvent() on the Marker occurs. More...
 
void setDragging (bool drag)
 
void userInteractionEvent (UserInteractionEvent *event)
 
ViewWidgetview () const
 

Protected Member Functions

void _setPenColor (bool hilighted=false) const
 Set the pen according to the PresetWidget. More...
 

Protected Attributes

bool _dragging
 
Markerp_marker
 
ViewWidgetp_view
 

Detailed Description

Definition at line 40 of file PointMarkerOpenGlRenderingViewRenderer.hh.

Constructor & Destructor Documentation

◆ PointMarkerOpenGlRenderingViewRenderer() [1/2]

PointMarkerOpenGlRenderingViewRenderer::PointMarkerOpenGlRenderingViewRenderer ( PointMarker marker,
OpenGlRenderingViewWidget view 
)

◆ PointMarkerOpenGlRenderingViewRenderer() [2/2]

PointMarkerOpenGlRenderingViewRenderer::PointMarkerOpenGlRenderingViewRenderer ( PointMarkerOpenGlRenderingViewRenderer const &  renderer)

◆ ~PointMarkerOpenGlRenderingViewRenderer()

PointMarkerOpenGlRenderingViewRenderer::~PointMarkerOpenGlRenderingViewRenderer ( )

Member Function Documentation

◆ clone()

MarkerRenderer* PointMarkerOpenGlRenderingViewRenderer::clone ( ) const
virtual

◆ render()

void PointMarkerOpenGlRenderingViewRenderer::render ( QPainter *  painter = NULL) const
virtual

Main rendering routine which is called whenever a paintEvent() on the Marker occurs.

Within this function the actual rendering of the associated Marker 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
painterThe 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 MarkerRenderer.

◆ userInteractionEvent()

void PointMarkerOpenGlRenderingViewRenderer::userInteractionEvent ( UserInteractionEvent event)
virtual

Reimplemented from MarkerRenderer.

◆ geometry()

atb::SurfaceGeometry const& PointMarkerOpenGlRenderingViewRenderer::geometry ( ) const

◆ _setPenColor()

void MarkerOpenGlRenderingViewRenderer::_setPenColor ( bool  hilighted = false) const
protectedinherited

Set the pen according to the PresetWidget.

Parameters
hilightedIf the marker is selected set this bool to true

◆ marker()

Marker* MarkerRenderer::marker ( ) const
inherited

◆ view()

ViewWidget* MarkerRenderer::view ( ) const
inherited

◆ isDragging()

bool MarkerRenderer::isDragging ( ) const
inherited

◆ setDragging()

void MarkerRenderer::setDragging ( bool  drag)
inherited

◆ cacheUpdatesEnabled()

bool MarkerRenderer::cacheUpdatesEnabled ( ) const
inherited

Check whether cache updates are enabled.

Returns
true if the cache is updated by changes in Marker or View false otherwise
See also
setCacheUpdatesEnabled(bool)

◆ setCacheUpdatesEnabled

void MarkerRenderer::setCacheUpdatesEnabled ( bool  enable)
slotinherited

Enables or disables the updates of the rendering cache.

This usually means that changes in the Marker 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 marker of which not each should trigger a repaint.

Parameters
enabletrue to enable, false to disable cache updates

◆ updateCache

virtual void MarkerRenderer::updateCache ( ) const
virtualslotinherited

Update the rendering cache.

This function is called by the associated Marker if its content changes or by the ViewWidget if the ViewPosition changes such that an cache update might be necessary. 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 cache updates using the setCacheUpdatesEnabled() function. This is important if you programmatically perform many operations on the Marker, 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 markers are involved you should call setUpdatesEnabled(false) to the view before these changes.

Field Documentation

◆ p_marker

Marker* MarkerRenderer::p_marker
protectedinherited

Definition at line 131 of file MarkerRenderer.hh.

◆ p_view

ViewWidget* MarkerRenderer::p_view
protectedinherited

Definition at line 132 of file MarkerRenderer.hh.

◆ _dragging

bool MarkerRenderer::_dragging
protectedinherited

Definition at line 134 of file MarkerRenderer.hh.


The documentation for this class was generated from the following file: