Add tests for planar manipulator draw when dealing with scaling (#6164)
* add support to add a custom debug display request interface for manipulator test framework Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * wip changes to support tests for manipulator view drawing Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * add test for planar manipulator draw when dealing with scaling Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * additional comments for added context Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * small updates/fixes after PR feedback Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * fix for missing NullDebugDisplayRequests Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
09c9548ba4
commit
969dbf407a
+3
-2
@@ -347,8 +347,9 @@ namespace PhysX
|
||||
void JointsSubComponentModeAngleCone::ConfigurePlanarView(const AZ::Color& planeColor, const AZ::Color& plane2Color)
|
||||
{
|
||||
AzToolsFramework::ManipulatorViews views;
|
||||
views.emplace_back(CreateManipulatorViewQuad(
|
||||
*m_yzPlanarManipulator, planeColor, plane2Color, AZ::Vector3::CreateZero(), AzToolsFramework::PlanarManipulatorAxisLength()));
|
||||
views.emplace_back(AzToolsFramework::CreateManipulatorViewQuad(
|
||||
m_yzPlanarManipulator->GetAxis1(), m_yzPlanarManipulator->GetAxis2(), planeColor, plane2Color, AZ::Vector3::CreateZero(),
|
||||
AzToolsFramework::PlanarManipulatorAxisLength()));
|
||||
m_yzPlanarManipulator->SetViews(AZStd::move(views));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/Math/Matrix3x3.h>
|
||||
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
|
||||
#include <AzFramework/UnitTest/TestDebugDisplayRequests.h>
|
||||
#include <AzFramework/Viewport/CameraState.h>
|
||||
#include <AzManipulatorTestFramework/AzManipulatorTestFramework.h>
|
||||
#include <AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h>
|
||||
@@ -38,10 +39,6 @@ namespace UnitTest
|
||||
static const AzToolsFramework::ManipulatorManagerId TestManipulatorManagerId =
|
||||
AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId"));
|
||||
|
||||
class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests
|
||||
{
|
||||
};
|
||||
|
||||
class WhiteBoxManipulatorFixture : public WhiteBoxTestFixture
|
||||
{
|
||||
public:
|
||||
@@ -67,7 +64,8 @@ namespace UnitTest
|
||||
|
||||
// create the direct call manipulator viewport interaction and an immediate mode dispatcher
|
||||
AZStd::unique_ptr<AzManipulatorTestFramework::ManipulatorViewportInteraction> viewportManipulatorInteraction =
|
||||
AZStd::make_unique<AzManipulatorTestFramework::DirectCallManipulatorViewportInteraction>();
|
||||
AZStd::make_unique<AzManipulatorTestFramework::DirectCallManipulatorViewportInteraction>(
|
||||
AZStd::make_shared<NullDebugDisplayRequests>());
|
||||
AZStd::unique_ptr<AzManipulatorTestFramework::ImmediateModeActionDispatcher> actionDispatcher =
|
||||
AZStd::make_unique<AzManipulatorTestFramework::ImmediateModeActionDispatcher>(
|
||||
*viewportManipulatorInteraction);
|
||||
|
||||
Reference in New Issue
Block a user