Class SelectionVisuals
Namespace: ValveResourceFormat.Renderer.Editor.Selection
Assembly: Renderer.dll
Draws what is selected in a SelectionSet the way Hammer does. The helpers of a selected entity show their selected shapes in place of their unselected ones. One box around the selection shows the length of its edges. The name of each node is drawn, and optionally the lighting it uses. The selected nodes are outlined, and show their tools materials even while those are hidden.
public sealed class SelectionVisualsInheritance
object ← SelectionVisuals
Constructors
SelectionVisuals(SelectionSet, HammerEntityVisuals, ToolsVisibility, RendererContext)
Initializes the visuals of a selection.
public SelectionVisuals(SelectionSet selection, HammerEntityVisuals entityVisuals, ToolsVisibility tools, RendererContext rendererContext)Parameters
selection SelectionSet
The selection to draw.
entityVisuals HammerEntityVisuals
The editor entities of the view, whose helpers draw the shapes of a selected entity.
tools ToolsVisibility
The tools visibility of the view, which is told what is selected.
rendererContext RendererContext
Renderer context for loading the outline shaders.
Properties
LightingBindings
Gets or sets which lighting is shown linked to each selected node.
public LightingBindingDisplay LightingBindings { get; set; }Property Value
Shapes
Gets the shapes of the selection, in world space, as the last SelectionVisuals.Update(RenderContext, UpdateContext) drew them.
public ToolGeometry Shapes { get; }Property Value
Methods
Delete()
Deletes the GL objects.
public void Delete()RenderOutline(Renderer, Framebuffer, Framebuffer)
Outlines the selected nodes as the last frame drew them.
public void RenderOutline(Renderer renderer, Framebuffer sceneFramebuffer, Framebuffer target)Parameters
renderer Renderer
The renderer of the frame, which resolved the scene depth.
sceneFramebuffer Framebuffer
The framebuffer the scene was rendered into.
target Framebuffer
The framebuffer the outline is drawn over, the size of the scene.
Update(RenderContext, UpdateContext)
Draws the shapes and labels of the current selection again.
public void Update(Scene.RenderContext renderContext, Scene.UpdateContext updateContext)Parameters
renderContext Scene.RenderContext
Render context providing the camera.
updateContext Scene.UpdateContext
Update context providing the text renderer.

