Shkyera Engine
Easy to use, game engine for Python
shkyera::SceneWidget Class Reference

A user interface widget for rendering scenes. More...

#include <SceneWidget.hpp>

Inheritance diagram for shkyera::SceneWidget:
[legend]

Public Member Functions

virtual void draw () override
 Implementation of the abstract draw method to render the scene widget. More...
 
void adjustSize ()
 Adjust the size of the scene widget. More...
 
void setRenderer (std::shared_ptr< Renderer > renderer)
 Set the renderer to use for rendering the scene. More...
 
 Widget (std::string name)
 Constructor to create a widget with a specified name. More...
 
- Public Member Functions inherited from shkyera::Widget
 Widget (std::string name)
 Constructor to create a widget with a specified name. More...
 

Private Member Functions

void drawRuntime () const
 Draw the runtime rendered scene. More...
 
void drawScene ()
 Draw the empty scene when it is not running. More...
 
void readInput () const
 Read the user input from the keyboard and notify the Python intepreter of it. More...
 

Private Attributes

std::shared_ptr< Renderer_renderer
 A shared pointer to the renderer used for scene rendering. More...
 
ImVec2 _renderSize
 The size of the rendered scene area. More...
 

Additional Inherited Members

- Public Attributes inherited from shkyera::Widget
std::string _name
 The name of the widget. More...
 

Detailed Description

A user interface widget for rendering scenes.

The SceneWidget class provides a graphical user interface widget for rendering and displaying scenes using a renderer.

Member Function Documentation

◆ adjustSize()

void shkyera::SceneWidget::adjustSize ( )

Adjust the size of the scene widget.

◆ draw()

void shkyera::SceneWidget::draw ( )
overridevirtual

Implementation of the abstract draw method to render the scene widget.

Implements shkyera::Widget.

◆ drawRuntime()

void shkyera::SceneWidget::drawRuntime ( ) const
private

Draw the runtime rendered scene.

◆ drawScene()

void shkyera::SceneWidget::drawScene ( )
private

Draw the empty scene when it is not running.

◆ readInput()

void shkyera::SceneWidget::readInput ( ) const
private

Read the user input from the keyboard and notify the Python intepreter of it.

◆ setRenderer()

void shkyera::SceneWidget::setRenderer ( std::shared_ptr< Renderer renderer)

Set the renderer to use for rendering the scene.

Parameters
rendererA shared pointer to the renderer to associate with this widget.

◆ Widget()

shkyera::Widget::Widget

Constructor to create a widget with a specified name.

Parameters
nameThe name of the widget.

Member Data Documentation

◆ _renderer

std::shared_ptr<Renderer> shkyera::SceneWidget::_renderer
private

A shared pointer to the renderer used for scene rendering.

◆ _renderSize

ImVec2 shkyera::SceneWidget::_renderSize
private

The size of the rendered scene area.


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