#include <EditorCameraBus.h>
Inherits AZ::EBusTraits.
|
static void | Reflect (AZ::ReflectContext *context) |
|
This bus allows you to get and set the current editor viewport camera
◆ GetActiveCameraPosition()
virtual bool Camera::EditorCameraRequests::GetActiveCameraPosition |
( |
AZ::Vector3 & |
| ) |
|
|
inlinevirtual |
Gets the position of the currently active Editor camera. The Editor can have multiple viewports displayed, though at most only one is active at any point in time. (Active is not the same as "has focus" - a different editor pane can have focus, but there's still one active viewport that's updating every frame, and the others are not)
- Parameters
-
cameraPos | On return, the current camera position in the one active Editor viewport. |
- Returns
- True if the camera position was successfully retrieved, false if not.
◆ GetActiveCameraState()
virtual bool Camera::EditorCameraRequests::GetActiveCameraState |
( |
AzFramework::CameraState & |
cameraState | ) |
|
|
inlinevirtual |
Gets the position of the currently active Editor camera. The Editor can have multiple viewports displayed, though at most only one is active at any point in time. (Active is not the same as "has focus" - a different editor pane can have focus, but there's still one active viewport that's updating every frame, and the others are not).
- Parameters
-
cameraView | The current camera view in the one active Editor viewport. |
- Returns
- True if the camera view was successfully retrieved, false if not.
◆ GetActiveCameraTransform()
virtual AZStd::optional< AZ::Transform > Camera::EditorCameraRequests::GetActiveCameraTransform |
( |
| ) |
|
|
inlinevirtual |
Gets the transform of the currently active Editor camera. The Editor can have multiple viewports displayed, though at most only one is active at any point in time. (Active is not the same as "has focus" - a different editor pane can have focus, but there's still one active viewport that's updating every frame, and the others are not)
- Returns
- the current camera transform in the one active Editor viewport.
◆ GetCameraFoV()
virtual AZStd::optional< float > Camera::EditorCameraRequests::GetCameraFoV |
( |
| ) |
|
|
inlinevirtual |
Gets the field of view of the currently active Editor camera. The Editor can have multiple viewports displayed, though at most only one is active at any point in time. (Active is not the same as "has focus" - a different editor pane can have focus, but there's still one active viewport that's updating every frame, and the others are not)
- Returns
- the current camera field of view in the one active Editor viewport.
◆ GetCurrentViewEntityId()
virtual AZ::EntityId Camera::EditorCameraRequests::GetCurrentViewEntityId |
( |
| ) |
|
|
inlinevirtual |
Gets the id of the current view entity. Invalid EntityId is returned for the default editor camera
- Returns
- the entityId of the entity currently being used as the view. The Invalid entity id is returned for the default editor camera
◆ SetViewFromEntityPerspective()
virtual void Camera::EditorCameraRequests::SetViewFromEntityPerspective |
( |
const AZ::EntityId & |
| ) |
|
|
inlinevirtual |
Sets the view from the entity's perspective
- Parameters
-
entityId | the id of the entity whose perspective is to be used |
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorCameraBus.h