Class ToolPickTargets
Namespace: ValveResourceFormat.Renderer.Editor.ToolRender
Assembly: Renderer.dll
What a ToolRenderContext draws inside its pick objects, which a ray through the cursor picks the nearest of. This is how Hammer finds the part of a tool under the cursor: by the faces and handles it draws for it, including those drawn in ToolRenderMode.PickProxy only to be picked.
public sealed class ToolPickTargetsInheritance
object ← ToolPickTargets
Properties
IsEmpty
Gets whether nothing has been drawn to be picked.
public bool IsEmpty { get; }Property Value
bool
Methods
Clear()
Drops everything drawn.
public void Clear()Pick(Camera, Vector2)
Finds what is nearest the camera under a point of the screen: faces from either side, and handles by the square of their size around where they are on the screen.
public int? Pick(Camera camera, Vector2 screenPoint)Parameters
camera Camera
The camera the shapes are seen with.
screenPoint Vector2
The point, in pixels from the top left of the view.
Returns
int?
The pick object id of what is hit, or null when nothing is.

