![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/GlOrientationMeshOverlay.h>
The GlOrientationMeshOverlay class draws an overlay that shows the current camera orientation of a view on a proxy mesh. More...
The GlOrientationMeshOverlay class draws an overlay that shows the current camera orientation of a view on a proxy mesh.
The maximum extent of the mesh should be between -1 and 1 in every dimension otherwise the mesh will be clipped. The overlay also supports texturing if the mesh has a texture and texture coordinates.
Public Member Functions | |
GlOrientationMeshOverlay (const Mesh &mesh, GlView *view) | |
Constructs a new GlOrientationMeshOverlay from a mesh which will use the orientation of view. | |
void | render (const GL::Viewport &viewport) override |
render the overlay with the given width and height | |
void | setOpacity (double alpha) |
Sets the opacity of the mesh (default: 0.75) | |
double | opacity () const |
void | loadMesh (const Mesh &mesh) |
Updates the mesh of the overlay. | |
bool | hasMesh () const |
Returns whether it currently has a valid mesh set. | |
void | setBackgroundImage (std::unique_ptr< SharedImage > backgroundImage) |
Set an optional background image to show behind the mesh. | |
![]() | |
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 | update () |
updates any intermediate data the overlay uses for rendering | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
bool | m_visible = true |
Overlay visibility. | |
int | m_sizeHintWidth = 0 |
int | m_sizeHintHeight = 0 |
int | m_minSizeHintWidth = 0 |
int | m_minSizeHintHeight = 0 |
GlOrientationMeshOverlay | ( | const Mesh & | mesh, |
GlView * | view ) |
Constructs a new GlOrientationMeshOverlay from a mesh which will use the orientation of view.
The mesh is not stored and can be deleted after this call. An exception is raised if the rendering resources like the shader program could not be initialized.
|
overridevirtual |
render the overlay with the given width and height
Implements GlOverlay.
void loadMesh | ( | const Mesh & | mesh | ) |
Updates the mesh of the overlay.
The mesh is not stored and can be deleted after this call.