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 <CameraBus.h>
Inherits AZ::ComponentBus.
Public Member Functions | |
virtual float | GetFov () |
virtual float | GetFovDegrees ()=0 |
virtual float | GetFovRadians ()=0 |
virtual float | GetNearClipDistance ()=0 |
virtual float | GetFarClipDistance ()=0 |
virtual float | GetFrustumWidth ()=0 |
virtual float | GetFrustumHeight ()=0 |
virtual bool | IsOrthographic ()=0 |
virtual float | GetOrthographicHalfWidth ()=0 |
virtual void | SetFov (float fov) |
virtual void | SetFovDegrees (float fovInDegrees)=0 |
virtual void | SetFovRadians (float fovInRadians)=0 |
virtual void | SetNearClipDistance (float nearClipDistance)=0 |
virtual void | SetFarClipDistance (float farClipDistance)=0 |
virtual void | SetFrustumWidth (float width)=0 |
virtual void | SetFrustumHeight (float height)=0 |
virtual void | SetOrthographic (bool orthographic)=0 |
virtual void | SetOrthographicHalfWidth (float halfWidth)=0 |
virtual void | SetXRViewQuaternion (const AZ::Quaternion &viewQuat, uint32_t xrViewIndex)=0 |
virtual void | MakeActiveView ()=0 |
Makes the camera the active view. | |
virtual bool | IsActiveView ()=0 |
Check if this camera is the active render camera. | |
virtual Configuration | GetCameraConfiguration () |
Get the camera frustum's aggregate configuration. | |
virtual AZ::Vector3 | ScreenToWorld (const AZ::Vector2 &screenPosition, float depth)=0 |
virtual AZ::Vector3 | ScreenNdcToWorld (const AZ::Vector2 &screenNdcPosition, float depth)=0 |
virtual AZ::Vector2 | WorldToScreen (const AZ::Vector3 &worldPosition)=0 |
virtual AZ::Vector2 | WorldToScreenNdc (const AZ::Vector3 &worldPosition)=0 |
Use this bus to send messages to a camera component on an entity If you create your own camera you should implement this bus Call like this: Camera::CameraRequestBus::Event(cameraEntityId, &Camera::CameraRequestBus::Events::SetFov, newFov);
|
pure virtual |
Gets the camera's distance from the far clip plane in meters
|
inlinevirtual |
Gets the camera's field of view in degrees
|
pure virtual |
Gets the camera's field of view in degrees
|
pure virtual |
Gets the camera's field of view in radians
|
pure virtual |
Gets the camera frustum's height
|
pure virtual |
Gets the camera frustum's width
|
pure virtual |
Gets the camera's distance from the near clip plane in meters
|
pure virtual |
|
pure virtual |
Gets whether or not the camera is using an orthographic projection.
|
pure virtual |
Unprojects a position in screen space normalized device coordinates to world space. With a depth of zero, the position returned will be on the near clip plane of the camera in world space.
screenNdcPosition | The normalized device coordinates in the range [0,1] |
depth | The depth offset into the world relative to the near clip plane of the camera |
|
pure virtual |
Unprojects a position in screen space pixel coordinates to world space. With a depth of zero, the position returned will be on the near clip plane of the camera in world space.
screenPosition | The absolute screen position |
depth | The depth offset into the world relative to the near clip plane of the camera |
|
pure virtual |
Sets the far clip plane to a given distance from the camera in meters.
farClipDistance | The camera frustum's new far clip plane distance from camera |
|
inlinevirtual |
Sets the camera's field of view in degrees between 0 < fov < 180 degrees
fov | The camera frustum's new field of view in degrees |
|
pure virtual |
Sets the camera's field of view in degrees between 0 < fov < 180 degrees
fov | The camera frustum's new field of view in degrees |
|
pure virtual |
Sets the camera's field of view in radians between 0 < fov < pi radians
fov | The camera frustum's new field of view in radians |
|
pure virtual |
Sets the camera frustum's height
height | The camera frustum's new height |
|
pure virtual |
Sets the camera frustum's width
width | The camera frustum's new width |
|
pure virtual |
Sets the near clip plane to a given distance from the camera in meters. Should be small, but greater than 0
nearClipDistance | The camera frustum's new near clip plane distance from camera |
|
pure virtual |
Sets whether or not the camera should use an orthographic projection in place of a perspective projection.
orthographic | If true, the camera will use an orthographic projection |
|
pure virtual |
Sets the half-width of the orthographic projection. @params halfWidth Used to calculate the bounds of the projection while in orthographic mode. The height is calculated automatically based on the aspect ratio.
|
pure virtual |
Sets the Quaternion related to a stereoscopic view for a camera with the provided view index related to your eye. @params viewQuat Used to cache view orientation data from the XR device @params xrViewIndex View index related to the pipeline associated with a specific eye
|
pure virtual |
Projects a position in world space to screen space for the given camera.
worldPosition | The world position |
|
pure virtual |
Projects a position in world space to screen space normalized device coordinates.
worldPosition | The world position |