Open 3D Engine AzFramework API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <CameraInput.h>
Inherited by AzFramework::CustomCameraInput, AzFramework::FocusCameraInput, AzFramework::LookScrollTranslationCameraInput, AzFramework::OrbitCameraInput, AzFramework::OrbitMotionDollyCameraInput, AzFramework::OrbitScrollDollyCameraInput, AzFramework::PanCameraInput, AzFramework::RotateCameraInput, and AzFramework::TranslateCameraInput.
Public Types | |
enum class | Activation { Idle , Beginning , Active , Ending } |
using | ActivateChangeFn = AZStd::function< void()> |
Public Member Functions | |
bool | Beginning () const |
bool | Ending () const |
bool | Idle () const |
bool | Active () const |
void | BeginActivation () |
void | EndActivation () |
void | CancelActivation () |
void | ContinueActivation () |
void | ClearActivation () |
void | Reset () |
virtual bool | HandleEvents (const InputState &state, const ScreenVector &cursorDelta, float scrollDelta)=0 |
Respond to input events to transition a camera input to active, handle input while running, and restore to idle when input ends. | |
virtual Camera | StepCamera (const Camera &targetCamera, const ScreenVector &cursorDelta, float scrollDelta, float deltaTime)=0 |
virtual bool | Exclusive () const |
void | SetActivationBeganFn (ActivateChangeFn activationBeganFn) |
void | SetActivationEndedFn (ActivateChangeFn activationEndedFn) |
Protected Member Functions | |
virtual void | ResetImpl () |
Handle any state reset that may be required for the camera input (optional). | |
Base class for all camera behaviors. The core interface consists of: HandleEvents, used to receive and process incoming input events to begin, update and end a behavior. StepCamera, to update the current camera transform (position and orientation).
|
strong |
The state of activation the camera input is currently in. State changes of Activation: Idle -> Beginning -> Active -> Ending -> Idle
Enumerator | |
---|---|
Idle | Camera input is not currently active (initial state and transitioned to from Ending). |
Beginning | Camera input is just beginning (transitioned to from Idle). |
Active | Camera input is currently active and running (transitioned to from Beginning). |
Ending | Camera input is ending and will return to idle (transitioned to from Active). |
|
inlinevirtual |
It is usually possible for one to many camera inputs to be running at the same time (the default), it is however possible to to make a camera input 'exclusive', so only it can run at a time. This implies that all other behaviors must have stopped before it can begin, and no other camera input can run while it is active.
Reimplemented in AzFramework::OrbitCameraInput.
|
pure virtual |
Use processed input events to update the state of the camera.
Implemented in AzFramework::CustomCameraInput, AzFramework::FocusCameraInput, AzFramework::OrbitCameraInput, AzFramework::LookScrollTranslationCameraInput, AzFramework::OrbitMotionDollyCameraInput, AzFramework::OrbitScrollDollyCameraInput, AzFramework::TranslateCameraInput, AzFramework::PanCameraInput, and AzFramework::RotateCameraInput.