class
SceneHandles
The central place for interacting with and drawing handles.
Public
Constructors
SceneHandles
Methods
~SceneHandles
BeginInput
Triggers handle pre-input callbacks.
Must be called before all updateInput() calls and followed by endInput(). This should be called once per frame.
UpdateInput
To be called every frame.
Updates interactable handle sliders based on provided input. Make sure to call beginInput() before this method, followed by endInput() when done.
- camera
- Camera that the input positions are relative to.
- inputPos
- Position of the pointer, relative to the provided camera viewport.
- inputDelta
- Determines pointer movement since last call to this method.
Returns: True if handle slider hover state changed, false otherwise.
EndInput
Triggers handle post-input callbacks.
Must be called after all updateInput() calls and after beginInput(). This should be called once per frame.
Draw
Gathers all handles in the scene submits them for drawing from the provided camera's perspective.
TrySelect
Select a handle slider at the specified location, if there is any under the pointer.
Makes the selected slider active and draggable.
- camera
- Camera that the input positions are relative to, and destination to draw the handles to.
- inputPos
- Position of the pointer, relative to the provided camera viewport.
Returns: True if handle slider active state changed, false otherwise.
ClearSelection
Clears the currently selected/active handle slider for the specified camera.
IsHandleActive
Is any handle slider selected/active on the specified camera.
GetHandleSize
Returns the uniform size for a handle rendered in , at the world position .
The handles will be scaled so that they appear the same size regardless of distance from camera.
SetDefaultHandleSize
Sets the default handle size.
This controls the uniform scale returned from getHandleSize() method.
SetSettings
Sets editor settings that will be used for controlling various handle behaviour.
staticCreate
Creates a new scene handles object associated with the provided scene.
Internal
Methods
GetSliderManager
Returns the manager that can be used for interacting with handle sliders.
staticSetFactory
Sets the object that will be used for creating now SceneHandles objects when Create() is called.
If null is provided, then Create() will output default SceneHandles object types.
Protected
Methods
GetDrawHelper
Returns an object that converts draw commands into meshes that will be drawn.
UpdateFromEditorSettings
Updates the internal properties from editor settings.
TriggerPreInput
Called during handle update.
Allows handle sliders to be created or destroyed before any input is handled.
TriggerPostInput
Called during handle update after handle input is processed.
Allows implementation to respond to delta values calculated in sliders due to input.
QueueDrawCommands
Queues handle draw commands from all the registered handles.
To be implemented by base classes.