Formatting-only change - Update Manipulator and Viewport AzToolsFramework files (#1143)
* formatting changes to AzToolsFramework viewport related types + API comment style updates * minor format change - include ordering * improve formatting by moving comment * fix compile error and switch to use AZ_Printf * small polish changes after review feedback
This commit is contained in:
committed by
GitHub
parent
c751cda73d
commit
cf8a6761bf
+4
-2
@@ -30,8 +30,10 @@ namespace AzManipulatorTestFramework
|
||||
// create a default sphere view for a manipulator for simple intersection
|
||||
template<typename Manipulator>
|
||||
void SetupManipulatorView(
|
||||
AZStd::shared_ptr<Manipulator> manipulator, const AzToolsFramework::ManipulatorManagerId manipulatorManagerId,
|
||||
const AZ::Vector3& position, const float radius)
|
||||
AZStd::shared_ptr<Manipulator> manipulator,
|
||||
const AzToolsFramework::ManipulatorManagerId manipulatorManagerId,
|
||||
const AZ::Vector3& position,
|
||||
const float radius)
|
||||
{
|
||||
// unit sphere view
|
||||
auto sphereView = AzToolsFramework::CreateManipulatorViewSphere(
|
||||
|
||||
+19
-23
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h>
|
||||
#include <AzManipulatorTestFramework/ViewportInteraction.h>
|
||||
@@ -19,10 +19,10 @@ namespace AzManipulatorTestFramework
|
||||
using MouseInteraction = AzToolsFramework::ViewportInteraction::MouseInteraction;
|
||||
using MouseInteractionEvent = AzToolsFramework::ViewportInteraction::MouseInteractionEvent;
|
||||
|
||||
class CustomManipulatorManager
|
||||
: public AzToolsFramework::ManipulatorManager
|
||||
class CustomManipulatorManager : public AzToolsFramework::ManipulatorManager
|
||||
{
|
||||
using ManagerBase = AzToolsFramework::ManipulatorManager;
|
||||
|
||||
public:
|
||||
using ManagerBase::ManagerBase;
|
||||
|
||||
@@ -31,18 +31,17 @@ namespace AzManipulatorTestFramework
|
||||
};
|
||||
|
||||
//! Implementation of the manipulator interface using direct access to the manipulator manager.
|
||||
class DirectCallManipulatorManager
|
||||
: public ManipulatorManagerInterface
|
||||
class DirectCallManipulatorManager : public ManipulatorManagerInterface
|
||||
{
|
||||
public:
|
||||
DirectCallManipulatorManager(
|
||||
ViewportInteractionInterface* viewportInteraction,
|
||||
AZStd::shared_ptr<CustomManipulatorManager> manipulatorManager);
|
||||
|
||||
ViewportInteractionInterface* viewportInteraction, AZStd::shared_ptr<CustomManipulatorManager> manipulatorManager);
|
||||
|
||||
// ManipulatorManagerInterface ...
|
||||
void ConsumeMouseInteractionEvent(const MouseInteractionEvent& event);
|
||||
AzToolsFramework::ManipulatorManagerId GetId() const override;
|
||||
bool ManipulatorBeingInteracted() const override;
|
||||
|
||||
private:
|
||||
// Trigger the updating of manipulator bounds.
|
||||
void DrawManipulators(const MouseInteraction& mouseInteraction);
|
||||
@@ -61,8 +60,7 @@ namespace AzManipulatorTestFramework
|
||||
}
|
||||
|
||||
DirectCallManipulatorManager::DirectCallManipulatorManager(
|
||||
ViewportInteractionInterface* viewportInteraction,
|
||||
AZStd::shared_ptr<CustomManipulatorManager> manipulatorManager)
|
||||
ViewportInteractionInterface* viewportInteraction, AZStd::shared_ptr<CustomManipulatorManager> manipulatorManager)
|
||||
: m_viewportInteraction(viewportInteraction)
|
||||
, m_manipulatorManager(AZStd::move(manipulatorManager))
|
||||
{
|
||||
@@ -126,11 +124,9 @@ namespace AzManipulatorTestFramework
|
||||
|
||||
DirectCallManipulatorViewportInteraction::DirectCallManipulatorViewportInteraction()
|
||||
: m_customManager(
|
||||
AZStd::make_unique<CustomManipulatorManager>(
|
||||
AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId"))))
|
||||
AZStd::make_unique<CustomManipulatorManager>(AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId"))))
|
||||
, m_viewportInteraction(AZStd::make_unique<ViewportInteraction>())
|
||||
, m_manipulatorManager(
|
||||
AZStd::make_unique<DirectCallManipulatorManager>(m_viewportInteraction.get(), m_customManager))
|
||||
, m_manipulatorManager(AZStd::make_unique<DirectCallManipulatorManager>(m_viewportInteraction.get(), m_customManager))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzManipulatorTestFramework/ImmediateModeActionDispatcher.h>
|
||||
#include <AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h>
|
||||
#include <AzManipulatorTestFramework/ImmediateModeActionDispatcher.h>
|
||||
#include <AzToolsFramework/ComponentMode/EditorComponentModeBus.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityHelpers.h>
|
||||
|
||||
@@ -33,8 +33,7 @@ namespace AzManipulatorTestFramework
|
||||
using KeyboardModifier = AzToolsFramework::ViewportInteraction::KeyboardModifier;
|
||||
using MouseInteractionEvent = AzToolsFramework::ViewportInteraction::MouseInteractionEvent;
|
||||
|
||||
ImmediateModeActionDispatcher::ImmediateModeActionDispatcher(
|
||||
ManipulatorViewportInteraction& viewportManipulatorInteraction)
|
||||
ImmediateModeActionDispatcher::ImmediateModeActionDispatcher(ManipulatorViewportInteraction& viewportManipulatorInteraction)
|
||||
: m_viewportManipulatorInteraction(viewportManipulatorInteraction)
|
||||
{
|
||||
}
|
||||
@@ -126,8 +125,7 @@ namespace AzManipulatorTestFramework
|
||||
void ImmediateModeActionDispatcher::EnterComponentModeImpl(const AZ::Uuid& uuid)
|
||||
{
|
||||
using AzToolsFramework::ComponentModeFramework::ComponentModeSystemRequestBus;
|
||||
ComponentModeSystemRequestBus::Broadcast(
|
||||
&ComponentModeSystemRequestBus::Events::AddSelectedComponentModesOfType, uuid);
|
||||
ComponentModeSystemRequestBus::Broadcast(&ComponentModeSystemRequestBus::Events::AddSelectedComponentModesOfType, uuid);
|
||||
}
|
||||
|
||||
const AzToolsFramework::ViewportInteraction::MouseInteractionEvent* ImmediateModeActionDispatcher::GetMouseInteractionEvent() const
|
||||
@@ -144,8 +142,7 @@ namespace AzManipulatorTestFramework
|
||||
|
||||
AzToolsFramework::ViewportInteraction::MouseInteractionEvent* ImmediateModeActionDispatcher::GetMouseInteractionEvent()
|
||||
{
|
||||
return const_cast<MouseInteractionEvent*>(
|
||||
static_cast<const ImmediateModeActionDispatcher*>(this)->GetMouseInteractionEvent());
|
||||
return const_cast<MouseInteractionEvent*>(static_cast<const ImmediateModeActionDispatcher*>(this)->GetMouseInteractionEvent());
|
||||
}
|
||||
|
||||
ImmediateModeActionDispatcher* ImmediateModeActionDispatcher::ExpectTrue(bool result)
|
||||
@@ -162,8 +159,7 @@ namespace AzManipulatorTestFramework
|
||||
return this;
|
||||
}
|
||||
|
||||
ImmediateModeActionDispatcher* ImmediateModeActionDispatcher::GetEntityWorldTransform(
|
||||
AZ::EntityId entityId, AZ::Transform& transform)
|
||||
ImmediateModeActionDispatcher* ImmediateModeActionDispatcher::GetEntityWorldTransform(AZ::EntityId entityId, AZ::Transform& transform)
|
||||
{
|
||||
Log("Getting entity world transform");
|
||||
transform = AzToolsFramework::GetWorldTransform(entityId);
|
||||
|
||||
Reference in New Issue
Block a user