Summary
Holds the backend state for a Gizmo scope. This allows us to have multiple different gizmo
states (for multiple views, multiple windows, game and editor) and push them as the current
active state whenever needed.
Constructors
Fields
Input |
Input state. Should be setup before push. |
Properties
ControlMode |
The current control mode. This is generally implementation specific.
We tend to use "mouse" and "firstperson". |
Debug |
If true, we'll draw some debug information |
DebugHitboxes |
If true we'll enable hitbox debugging |
PreviousInput |
The previous input state |
Selection |
This frame's created (or re-used) objects |
Settings |
Some global settings accessible to the gizmos. Your implementation
generally lets your users set up these things to their preference,
and the gizmos should try to obey them. |
World |
The SceneWorld this instance is writing to. This world exists only for this instance.
You need to add this world to your camera for it to render (!) |
Methods
Clear |
Called when the scene changes and we don't want to inherit a bunch of values.
We might want to just target some specific values here instead of clearing the log. |
Dispose |
Destroy this instance, clean up any created resources/scene objects, destroy the world. |
GetValue |
Generic storage for whatever you want to do.
You're responsible for not spamming into this and cleaning up after yourself. |
Push |
Push this instance as the global Gizmo state. All Gizmo calls during this scope
will use this instance. |
SetValue |
Generic storage for whatever you want to do.
You're responsible for not spamming into this and cleaning up after yourself. |
StompCursorPosition |
Set all of the state's cursor positions to this value. This stomps previous values
which will effectively clear any deltas. This should be used prior to starting a loop. |
Static Methods
FirstPersonCamera |
Helper to easily set up all of the inputs for this camera and widget. This is assuming
that the passed in widget is the render panel. |
OrbitCamera |
Orbit the camera around a point into the distance. |
UpdateInputs |
Helper to easily set up all of the inputs for this camera and widget. This is assuming
that the passed in widget is the render panel. |