// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Scripting/ScriptingType.h" struct RenderContext; class Texture; class SceneRenderTask; class Actor; /// /// Editor viewports icons rendering service. /// API_CLASS(Static, Namespace="FlaxEditor") class FLAXENGINE_API ViewportIconsRenderer { DECLARE_SCRIPTING_TYPE_NO_SPAWN(ViewportIconsRenderer); public: /// /// Draws the icons for the actors in the given scene (or actor tree). /// /// The rendering context. /// The actor (use scene for faster rendering). API_FUNCTION() static void DrawIcons(API_PARAM(Ref) RenderContext& renderContext, Actor* actor); /// /// Adds icon to the custom actor. /// /// The actor type. /// The icon texture to draw. API_FUNCTION() static void AddCustomIcon(const ScriptingTypeHandle& type, Texture* iconTexture); /// /// Adds actor to the viewport icon rendering. /// /// The actor to register for icon drawing. API_FUNCTION() static void AddActor(Actor* actor); /// /// Adds actor to the viewport icon rendering. /// /// The actor to register for icon drawing. /// The icon texture to draw. API_FUNCTION() static void AddActorWithTexture(Actor* actor, Texture* iconTexture); /// /// Removes actor from the viewport icon rendering. /// /// The actor to unregister for icon drawing. API_FUNCTION() static void RemoveActor(Actor* actor); };