Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::LookScrollTranslationCameraInput Class Reference

A camera input to handle discrete scroll events that can scroll (translate) the camera along its forward axis. More...

#include <CameraInput.h>

Inherits AzFramework::CameraInput.

Public Member Functions

bool HandleEvents (const InputState &state, const ScreenVector &cursorDelta, float scrollDelta) override
 Respond to input events to transition a camera input to active, handle input while running, and restore to idle when input ends.
 
Camera StepCamera (const Camera &targetCamera, const ScreenVector &cursorDelta, float scrollDelta, float deltaTime) override
 
- Public Member Functions inherited from AzFramework::CameraInput
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)
 

Public Attributes

AZStd::function< float()> m_scrollSpeedFn
 

Additional Inherited Members

- Public Types inherited from AzFramework::CameraInput
enum class  Activation { Idle , Beginning , Active , Ending }
 
using ActivateChangeFn = AZStd::function< void()>
 
- Protected Member Functions inherited from AzFramework::CameraInput
virtual void ResetImpl ()
 Handle any state reset that may be required for the camera input (optional).
 

Detailed Description

A camera input to handle discrete scroll events that can scroll (translate) the camera along its forward axis.

Member Function Documentation

◆ HandleEvents()

bool AzFramework::LookScrollTranslationCameraInput::HandleEvents ( const InputState state,
const ScreenVector cursorDelta,
float  scrollDelta 
)
overridevirtual

Respond to input events to transition a camera input to active, handle input while running, and restore to idle when input ends.

Implements AzFramework::CameraInput.

◆ StepCamera()

Camera AzFramework::LookScrollTranslationCameraInput::StepCamera ( const Camera targetCamera,
const ScreenVector cursorDelta,
float  scrollDelta,
float  deltaTime 
)
overridevirtual

Use processed input events to update the state of the camera.

Note
targetCamera is the current target camera at the beginning of an update. The returned camera is the targetCamera + some delta to get to the next camera position and/or orientation.

Implements AzFramework::CameraInput.


The documentation for this class was generated from the following file: