Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::EditorViewportIconDisplayInterface Class Referenceabstract

An interface for loading simple icon assets and rendering them to screen on a per-viewport basis. More...

#include <EditorViewportIconDisplayInterface.h>

Classes

struct  DrawParameters
 These draw parameters control rendering for a single icon to a single viewport. More...
 

Public Types

enum class  CoordinateSpace : AZ::u8 { ScreenSpace , WorldSpace }
 
enum class  IconLoadStatus : AZ::u8 { Unloaded , Loading , Loaded , Error }
 The current load status of an icon retrieved by GetOrLoadIconForPath.
 
using IconId = AZ::s32
 

Public Member Functions

 AZ_RTTI (EditorViewportIconDisplayInterface, "{D5190B58-2561-4F3F-B793-F1E7D454CDF2}")
 
virtual void DrawIcon (const DrawParameters &drawParameters)=0
 
virtual IconId GetOrLoadIconForPath (AZStd::string_view path)=0
 
virtual IconLoadStatus GetIconLoadStatus (IconId icon)=0
 Gets the current load status of an icon retrieved via GetOrLoadIconForPath.
 

Static Public Attributes

static constexpr IconId InvalidIconId = -1
 

Detailed Description

An interface for loading simple icon assets and rendering them to screen on a per-viewport basis.

Member Function Documentation

◆ DrawIcon()

virtual void AzToolsFramework::EditorViewportIconDisplayInterface::DrawIcon ( const DrawParameters drawParameters)
pure virtual

Draws an icon to a viewport given a set of draw parameters. Requires an IconId retrieved from GetOrLoadIconForPath.

◆ GetOrLoadIconForPath()

virtual IconId AzToolsFramework::EditorViewportIconDisplayInterface::GetOrLoadIconForPath ( AZStd::string_view  path)
pure virtual

Retrieves a reusable IconId for an icon at a given path. This will load the icon, if it has not already been loaded.

Parameters
pathshould be a relative asset path to an icon image asset. png and svg icons are currently supported.

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