Class GraphicalScene#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class GraphicalScene : public Karana::Scene::Scene#

Scene with an added graphics-specific interface.

Subclassed by Karana::Scene::WebScene

Public Functions

virtual ~GraphicalScene()#
virtual Karana::Core::ks_ptr<GraphicalSceneCamera> defaultCamera() const = 0#

Get the automatically created default camera.

Returns:

The default camera

virtual void renderToFile(const std::string &filepath) = 0#

Render the scene to a file.

Parameters:

filepath – - filename to render to

virtual Karana::Core::id_t addOverlayText(const std::string &message, float x, float y, const TextParameters &parameters = TextParameters{}) = 0#

Add text in screen space.

Parameters:
  • message – - The content of the overlay text

  • x – - The horizontal position of the text between 0 and 1

  • y – - The vertical position of the text between 0 and 1

  • parameters – - Addition text parameters

Returns:

Unique id to later update the text instance

virtual void setOverlayText(const Karana::Core::id_t &id, const std::string &message) = 0#

Update the content of an existing overlay text.

Parameters:
  • id – - Id for the text returned by a prior addOverlayText call

  • message – - The new content of the overlay text

virtual void removeOverlayText(const Karana::Core::id_t &id) = 0#

Delete an overlay text instance.

Parameters:

id – - Id for the text returned by a prior addOverlayText call

Protected Functions

GraphicalScene(std::string_view name)#

Constructor for a GraphicalScene.

Parameters:

name – - Name of the GraphicalScene