Open 3D Engine Camera Gem 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.
Camera::CameraComponentController Class Reference

Inherits CameraBus::Handler, CameraRequestBus::Handler, AZ::TransformNotificationBus::Handler, AZ::RPI::ViewportContextNotificationBus::Handler, and AZ::RPI::ViewProviderBus::Handler.

Public Member Functions

 AZ_TYPE_INFO (CameraComponentController, "{A27A0725-8C07-4BF2-BF95-B6CB0CBD01B8}")
 
 CameraComponentController (const CameraComponentConfig &config)
 
void SetShouldActivateFunction (AZStd::function< bool()> shouldActivateFunction)
 
void SetIsLockedFunction (AZStd::function< bool()> isLockedFunction)
 Defines a callback for determining whether this camera is currently locked by its transform.
 
void Init ()
 
void Activate (AZ::EntityId entityId)
 
void Deactivate ()
 
void SetConfiguration (const CameraComponentConfig &config)
 
const CameraComponentConfigGetConfiguration () const
 
AZ::RPI::ViewportContextPtr GetViewportContext ()
 
AZ::EntityId GetCameras () override
 
float GetFovDegrees () override
 
float GetFovRadians () override
 
float GetNearClipDistance () override
 
float GetFarClipDistance () override
 
float GetFrustumWidth () override
 
float GetFrustumHeight () override
 
bool IsOrthographic () override
 
float GetOrthographicHalfWidth () override
 
void SetFovDegrees (float fov) override
 
void SetFovRadians (float fov) override
 
void SetNearClipDistance (float nearClipDistance) override
 
void SetFarClipDistance (float farClipDistance) override
 
void SetFrustumWidth (float width) override
 
void SetFrustumHeight (float height) override
 
void SetOrthographic (bool orthographic) override
 
void SetOrthographicHalfWidth (float halfWidth) override
 
void SetXRViewQuaternion (const AZ::Quaternion &viewQuat, uint32_t xrViewIndex) override
 
void MakeActiveView () override
 
bool IsActiveView () override
 
AZ::Vector3 ScreenToWorld (const AZ::Vector2 &screenPosition, float depth) override
 
AZ::Vector3 ScreenNdcToWorld (const AZ::Vector2 &screenNdcPosition, float depth) override
 
AZ::Vector2 WorldToScreen (const AZ::Vector3 &worldPosition) override
 
AZ::Vector2 WorldToScreenNdc (const AZ::Vector3 &worldPosition) override
 
void OnTransformChanged (const AZ::Transform &local, const AZ::Transform &world) override
 
void OnViewportSizeChanged (AzFramework::WindowSize size) override
 
void OnViewportDefaultViewChanged (AZ::RPI::ViewPtr view) override
 
AZ::RPI::ViewPtr GetView () const override
 
AZ::RPI::ViewPtr GetStereoscopicView (AZ::RPI::ViewType viewType) const override
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 

Member Function Documentation

◆ SetShouldActivateFunction()

void Camera::CameraComponentController::SetShouldActivateFunction ( AZStd::function< bool()>  shouldActivateFunction)

Defines a callback for determining whether this camera should push itself to the top of the Atom camera stack. Used by the Editor to disable undesirable camera changes in edit mode.


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