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.
AzFramework::Cameras Class Reference

#include <CameraInput.h>

Public Member Functions

bool HandleEvents (const InputState &state, const ScreenVector &cursorDelta, float scrollDelta)
 
Camera StepCamera (const Camera &targetCamera, const ScreenVector &cursorDelta, float scrollDelta, float deltaTime)
 
bool AddCamera (AZStd::shared_ptr< CameraInput > cameraInput)
 
bool AddCameras (const AZStd::vector< AZStd::shared_ptr< AzFramework::CameraInput >> &cameraInputs)
 
bool RemoveCamera (const AZStd::shared_ptr< CameraInput > &cameraInput)
 
bool RemoveCameras (const AZStd::vector< AZStd::shared_ptr< AzFramework::CameraInput >> &cameraInputs)
 
void Reset ()
 Reset the state of all cameras.
 
void Clear ()
 Remove all cameras that were added.
 
bool Exclusive () const
 

Detailed Description

Manages a list of camera inputs. By default all camera inputs are added to the idle list, when a camera activates it will be added to the active list, when it deactivates it will be returned to the idle list.

Member Function Documentation

◆ AddCamera()

bool AzFramework::Cameras::AddCamera ( AZStd::shared_ptr< CameraInput cameraInput)

Add a camera input (behavior) to run in this set of camera inputs. The camera inputs added here will determine the overall behavior of the camera.

Returns
Returns if the camera was successfully added (if the camera already exists it is not added and AddCamera returns false).

◆ AddCameras()

bool AzFramework::Cameras::AddCameras ( const AZStd::vector< AZStd::shared_ptr< AzFramework::CameraInput >> &  cameraInputs)

Add a collection of camera inputs (behaviors) to run in this set of camera inputs.

Returns
Returns if all cameras were added successfully.

◆ Exclusive()

bool AzFramework::Cameras::Exclusive ( ) const

Is one of the cameras in the active camera inputs marked as 'exclusive'.

Note
This implies no other sibling cameras can begin while the exclusive camera is running.

◆ RemoveCamera()

bool AzFramework::Cameras::RemoveCamera ( const AZStd::shared_ptr< CameraInput > &  cameraInput)

Remove a camera input (behavior) to stop it running in the set of camera inputs.

Returns
Returns if the camera was removed successfully (if the could not be found RemoveCamera returns false).

◆ RemoveCameras()

bool AzFramework::Cameras::RemoveCameras ( const AZStd::vector< AZStd::shared_ptr< AzFramework::CameraInput >> &  cameraInputs)

Remove a collection of camera inputs (behaviors) to stop them running in the set of camera inputs.

Returns
Returns if all cameras were removed successfully.

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