Address PR feedback

Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
This commit is contained in:
Yuriy Toporovskyy
2021-08-05 10:50:29 -04:00
parent ba33dd4433
commit 3ad3dfd662
6 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -2513,7 +2513,7 @@ void EditorViewportWidget::SetViewAndMovementLockFromEntityPerspective(const AZ:
if (entityId.IsValid())
{
EBUS_EVENT_ID(entityId, Camera::CameraRequestBus, MakeActiveView);
Camera::CameraRequestBus::Event(entityId, &Camera::CameraRequestBus::Events::MakeActiveView);
}
else
{
+4 -1
View File
@@ -25,7 +25,10 @@
Ang3 CUndoViewRotation::GetActiveCameraRotation()
{
AZ::Transform activeCameraTm = AZ::Transform::CreateIdentity();
EBUS_EVENT_RESULT(activeCameraTm, Camera::ActiveCameraRequestBus, GetActiveCameraTransform);
Camera::ActiveCameraRequestBus::BroadcastResult(
activeCameraTm,
&Camera::ActiveCameraRequestBus::Events::GetActiveCameraTransform
);
const AZ::Matrix3x4 cameraMatrix = AZ::Matrix3x4::CreateFromTransform(activeCameraTm);
const Matrix33 cameraMatrixCry = AZMatrix3x3ToLYMatrix3x3(AZ::Matrix3x3::CreateFromMatrix3x4(cameraMatrix));
return RAD2DEG(Ang3::GetAnglesXYZ(cameraMatrixCry));
@@ -57,7 +57,7 @@ namespace AZ
float GetPerspectiveMatrixFOV(const Matrix4x4& m)
{
return 2.0 * atan(1.0f / m.GetElement(1, 1));
return 2.0 * AZStd::atan(1.0f / m.GetElement(1, 1));
}
Matrix4x4* MakeFrustumMatrixRH(Matrix4x4& out, float left, float right, float bottom, float top, float nearDist, float farDist, bool reverseDepth)
@@ -151,7 +151,10 @@ void CAudioControlsEditorPlugin::ExecuteTrigger(const AZStd::string_view sTrigge
if (ms_nAudioTriggerID != INVALID_AUDIO_CONTROL_ID)
{
AZ::Transform activeCameraTm = AZ::Transform::CreateIdentity();
EBUS_EVENT_RESULT(activeCameraTm, Camera::ActiveCameraRequestBus, GetActiveCameraTransform);
Camera::ActiveCameraRequestBus::BroadcastResult(
activeCameraTm,
&Camera::ActiveCameraRequestBus::Events::GetActiveCameraTransform
);
const AZ::Matrix3x4 cameraMatrix = AZ::Matrix3x4::CreateFromTransform(activeCameraTm);
Audio::SAudioRequest request;
@@ -1,5 +1,6 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
@@ -19,7 +20,7 @@ namespace Camera
{
void CameraSystemComponent::Reflect(AZ::ReflectContext* context)
{
if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<CameraSystemComponent, AZ::Component>()
->Version(1)
@@ -36,9 +37,9 @@ namespace Camera
void CameraSystemComponent::Deactivate()
{
CameraSystemRequestBus::Handler::BusDisconnect();
ActiveCameraRequestBus::Handler::BusDisconnect();
CameraNotificationBus::Handler::BusDisconnect();
ActiveCameraRequestBus::Handler::BusDisconnect();
CameraSystemRequestBus::Handler::BusDisconnect();
}
AZ::EntityId CameraSystemComponent::GetActiveCamera()
@@ -1,5 +1,6 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*