Class ViewportIconsRenderer
Editor viewports icons rendering service.
Inheritance
Namespace: FlaxEditor
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class ViewportIconsRenderer : Object
Properties
MaxSize
The maximum size of the icons.
Declaration
[Unmanaged]
public static float MaxSize { get; set; }
Property Value
|
System.Single
|
MaxSizeDistance
The distance to the camera at which the icons will be drawn at their maximum size.
Declaration
[Unmanaged]
public static float MaxSizeDistance { get; set; }
Property Value
|
System.Single
|
MinSize
The minimum size of the icons.
Declaration
[Unmanaged]
public static float MinSize { get; set; }
Property Value
|
System.Single
|
Scale
Global scale of the icons.
Declaration
[Unmanaged]
public static float Scale { get; set; }
Property Value
|
System.Single
|
Methods
AddActor(Actor)
Adds actor to the viewport icon rendering.
Declaration
[Unmanaged]
public static void AddActor(Actor actor)
Parameters
|
Actor
actor
The actor to register for icon drawing. |
AddActorWithTexture(Actor, Texture)
Adds actor to the viewport icon rendering.
Declaration
[Unmanaged]
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(Type, Texture)
Adds icon to the custom actor.
Declaration
[Unmanaged]
public static void AddCustomIcon(Type type, Texture iconTexture)
Parameters
|
System.Type
type
The actor type. |
|
Texture
iconTexture
The icon texture to draw. |
DrawIcons(ref RenderContext, Actor)
Draws the icons for the actors in the given scene (or actor tree).
Declaration
[Unmanaged]
public static void DrawIcons(ref RenderContext renderContext, Actor actor)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
Actor
actor
The actor (use scene for faster rendering). |
GetBounds(ref Vector3, ref Vector3, out BoundingSphere)
Draws the icons for the actors in the given scene (or actor tree).
Declaration
[Unmanaged]
public static void GetBounds(ref Vector3 position, ref Vector3 viewPosition, out BoundingSphere bounds)
Parameters
|
Vector3
position
The icon position. |
|
Vector3
viewPosition
The viewer position. |
|
BoundingSphere
bounds
The computed bounds for the icon. |
RemoveActor(Actor)
Removes actor from the viewport icon rendering.
Declaration
[Unmanaged]
public static void RemoveActor(Actor actor)
Parameters
|
Actor
actor
The actor to unregister for icon drawing. |