Class ViewportIconsRenderer
Editor viewports icons rendering service.
Inheritance
Assembly: FlaxEngine.dll
File: Editor/Utilities/ViewportIconsRenderer.h
Syntax
public class ViewportIconsRenderer
Fields
MaxSize
The maximum size of the icons.
Declaration
public static Real MaxSize
Field Value
|
Real
|
MaxSizeDistance
The distance to the camera at which the icons will be drawn at their maximum size.
Declaration
public static Real MaxSizeDistance
Field Value
|
Real
|
MinSize
The minimum size of the icons.
Declaration
public static Real MinSize
Field Value
|
Real
|
Scale
Global scale of the icons.
Declaration
public static float Scale
Field Value
|
float
|
Methods
AddActor(Actor* actor)
Adds actor to the viewport icon rendering.
Declaration
public static void AddActor(Actor* actor)
Parameters
|
Actor
actor
The actor to register for icon drawing. |
AddActorWithTexture(Actor* actor, Texture* iconTexture)
Adds actor to the viewport icon rendering.
Declaration
public static void AddActorWithTexture(Actor* actor, Texture* iconTexture)
Parameters
|
Actor
actor
The actor to register for icon drawing. |
|
Texture
iconTexture
The icon texture to draw. |
AddCustomIcon(const ScriptingTypeHandle& type, Texture* iconTexture)
Adds icon to the custom actor.
Declaration
public static void AddCustomIcon(const ScriptingTypeHandle& type, Texture* iconTexture)
Parameters
|
ScriptingTypeHandle
type
The actor type. |
|
Texture
iconTexture
The icon texture to draw. |
DrawIcons(RenderContext& renderContext, Actor* actor)
Draws the icons for the actors in the given scene (or actor tree).
Declaration
public static void DrawIcons(RenderContext& renderContext, Actor* actor)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
Actor
actor
The actor (use scene for faster rendering). |
GetBounds(const Vector3& position, const Vector3& viewPosition, BoundingSphere& bounds)
Draws the icons for the actors in the given scene (or actor tree).
Declaration
public static void GetBounds(const Vector3& position, const Vector3& viewPosition, BoundingSphere& bounds)
Parameters
|
Vector3
position
The icon position. |
|
Vector3
viewPosition
The viewer position. |
|
BoundingSphere
bounds
The computed bounds for the icon. |
RemoveActor(Actor* actor)
Removes actor from the viewport icon rendering.
Declaration
public static void RemoveActor(Actor* actor)
Parameters
|
Actor
actor
The actor to unregister for icon drawing. |