ImFusion SDK 4.3
GlOverlay Class Referenceabstract

#include <ImFusion/GL/GlOverlay.h>

Abstract base class for OpenGL overlays. More...

+ Inheritance diagram for GlOverlay:

Detailed Description

Abstract base class for OpenGL overlays.

In contrast to a GlObject, a GlOverlay is rendered on top of a GlView and reside in viewport space. Furthermore, you can not add a GlOverlay directly to a GlView. Instead it must always be wrapped in a InteractiveOverlay and added to an InteractiveView.

See also
InteravtiveOverlay

Public Member Functions

 GlOverlay (int widthHint, int heightHint, int minWidthHint, int minHeightHint)
 Instantiate a new GlOverlay with the given size hints.
 
virtual void setVisible (bool visible)
 Set overlay visibility.
 
virtual bool visible () const
 Return overlay visibility.
 
virtual void setSizeHint (int width, int height)
 Sets the preferred size of the overlay for a DPI scaling of 1.0.
 
virtual int sizeHintWidth () const
 Gets the preferred width of the overlay.
 
virtual int sizeHintHeight () const
 Gets the preferred height of the overlay.
 
virtual void setMinimalSizeHint (int width, int height)
 Sets the minimal size of the overlay for a DPI scaling of 1.0.
 
virtual int minimalSizeHintWidth () const
 Gets the minimal width of the overlay.
 
virtual int minimalSizeHintHeight () const
 Gets the minimal height of the overlay.
 
virtual void render (const GL::Viewport &viewport)=0
 render the overlay with the given width and height
 
virtual void update ()
 updates any intermediate data the overlay uses for rendering
 

Public Attributes

Signal< int, int > m_sizeChangedSignal
 Signal emitted when the size hint has changed.
 
Signal< int, int > m_minSizeChangedSignal
 Signal emitted when the minimum size hint has changed.
 

Protected Attributes

bool m_visible = true
 Overlay visibility.
 
int m_sizeHintWidth = 0
 
int m_sizeHintHeight = 0
 
int m_minSizeHintWidth = 0
 
int m_minSizeHintHeight = 0
 

Member Function Documentation

◆ setSizeHint()

virtual void setSizeHint ( int width,
int height )
virtual

Sets the preferred size of the overlay for a DPI scaling of 1.0.

The size hint should be the optimal size of the overlay to display all its information. If the overlay does not have a preferred size, the size hint should be set to to the minimalSizeHint.

◆ setMinimalSizeHint()

virtual void setMinimalSizeHint ( int width,
int height )
virtual

Sets the minimal size of the overlay for a DPI scaling of 1.0.

The minimal size should reflect the size to display the content in an undistorted way. The actual size of the overlay can still be lower than this, in which case the overlay should scale its content.

◆ render()

virtual void render ( const GL::Viewport & viewport)
pure virtual

◆ update()

virtual void update ( )
virtual

updates any intermediate data the overlay uses for rendering

Reimplemented in GlImageIntensifierAngleOverlay.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close