Gazebo Rendering

API Reference

8.2.1
NativeWindow Class Referenceabstract

An abstract interface to a basic native window render-engine. More...

#include <gz/rendering/NativeWindow.hh>

Public Member Functions

 NativeWindow ()
 Constructor. More...
 
virtual ~NativeWindow ()
 Destructor. More...
 
virtual void Draw (CameraPtr _camera)=0
 A native window is not associated with anything. Calling this function will draw whatever is currently the given camera. More...
 
virtual void NotifyFocused (bool _focused)=0
 Tells the native window whether it's under focus. More...
 
virtual void NotifyVisible (bool _visible)=0
 Tells the native window whether it's visible. More...
 
virtual void NotifyWindowMovedOrResized ()=0
 Call this when window resolution has changed. More...
 
virtual void RequestResolution (uint32_t _width, uint32_t _height)=0
 Requests a particular resolution. It may not be possible to satisfy it though and the new resolution may be different from current and requested (e.g. if you request 1920x1080 when that's the max monitor resolution after evaluating window borders, the title, and the start menu the OS may shrink the window so the whole thing is visible) More...
 

Detailed Description

An abstract interface to a basic native window render-engine.

Note: This is useful when you need a basic single window with both great performance and compatibility. But e.g. creating more than one window may have additional complexities depending on OS and RenderSystem

Constructor & Destructor Documentation

◆ NativeWindow()

Constructor.

◆ ~NativeWindow()

virtual ~NativeWindow ( )
virtual

Destructor.

Member Function Documentation

◆ Draw()

virtual void Draw ( CameraPtr  _camera)
pure virtual

A native window is not associated with anything. Calling this function will draw whatever is currently the given camera.

Remarks
Assumes _camera->Render() has already been called If the camera resolution doesn't match, the contents will be stretched.
Parameters
[in]_cameraCamera to draw

Implemented in BaseNativeWindow, and Ogre2NativeWindow.

◆ NotifyFocused()

virtual void NotifyFocused ( bool  _focused)
pure virtual

Tells the native window whether it's under focus.

Parameters
[in]_focusedTrue if we acquired focus. False if we lost it

Implemented in BaseNativeWindow, and Ogre2NativeWindow.

◆ NotifyVisible()

virtual void NotifyVisible ( bool  _visible)
pure virtual

Tells the native window whether it's visible.

Parameters
[in]_visibleTrue if we are at least partially visible. False otherwise

Implemented in BaseNativeWindow, and Ogre2NativeWindow.

◆ NotifyWindowMovedOrResized()

virtual void NotifyWindowMovedOrResized ( )
pure virtual

Call this when window resolution has changed.

Implemented in Ogre2NativeWindow, and BaseNativeWindow.

◆ RequestResolution()

virtual void RequestResolution ( uint32_t  _width,
uint32_t  _height 
)
pure virtual

Requests a particular resolution. It may not be possible to satisfy it though and the new resolution may be different from current and requested (e.g. if you request 1920x1080 when that's the max monitor resolution after evaluating window borders, the title, and the start menu the OS may shrink the window so the whole thing is visible)

Parameters
[in]_widthNew width of the window being requested
[in]_heightNew height of the window being requested

Implemented in BaseNativeWindow, and Ogre2NativeWindow.


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