From 7f8bd83d4ae93eba54f215be50245aff4dd4d6b3 Mon Sep 17 00:00:00 2001 From: greerdv Date: Fri, 28 May 2021 17:54:30 +0100 Subject: [PATCH] remove SetScale and CreateScale vector scale functions from Transform --- Code/Framework/AzCore/AzCore/Math/Transform.cpp | 2 -- Code/Framework/AzCore/AzCore/Math/Transform.h | 4 ---- Code/Framework/AzCore/AzCore/Math/Transform.inl | 16 ---------------- .../Manipulators/ManipulatorSpace.cpp | 2 +- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp index 0ae3e9c0ef..03c9578e85 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp @@ -312,7 +312,6 @@ namespace AZ Method("SetRotation", &Transform::SetRotation)-> Method("GetScale", &Transform::GetScale)-> Method("GetUniformScale", &Transform::GetUniformScale)-> - Method("SetScale", &Transform::SetScale)-> Method("SetUniformScale", &Transform::SetUniformScale)-> Method("ExtractUniformScale", &Transform::ExtractUniformScale)-> Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> @@ -334,7 +333,6 @@ namespace AZ Method("CreateFromQuaternionAndTranslation", &Transform::CreateFromQuaternionAndTranslation)-> Method("CreateFromMatrix3x3", &Transform::CreateFromMatrix3x3)-> Method("CreateFromMatrix3x3AndTranslation", &Transform::CreateFromMatrix3x3AndTranslation)-> - Method("CreateScale", &Transform::CreateScale)-> Method("CreateUniformScale", &Transform::CreateUniformScale)-> Method("CreateTranslation", &Transform::CreateTranslation)-> Method("ConstructFromValuesNumeric", &Internal::ConstructTransformFromValues); diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.h b/Code/Framework/AzCore/AzCore/Math/Transform.h index 974a0180e8..ff7df7326b 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.h +++ b/Code/Framework/AzCore/AzCore/Math/Transform.h @@ -92,9 +92,6 @@ namespace AZ static Transform CreateFromMatrix3x4(const Matrix3x4& value); - //! Sets the transform to apply scale only, no rotation or translation. - static Transform CreateScale(const AZ::Vector3& scale); - //! Sets the transform to apply (uniform) scale only, no rotation or translation. static Transform CreateUniformScale(const float scale); @@ -127,7 +124,6 @@ namespace AZ Vector3 GetScale() const; float GetUniformScale() const; - void SetScale(const Vector3& v); void SetUniformScale(const float scale); //! Sets the transform's scale to a unit value and returns the previous scale value. diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.inl b/Code/Framework/AzCore/AzCore/Math/Transform.inl index 7550e2bdd8..3325a29f16 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.inl +++ b/Code/Framework/AzCore/AzCore/Math/Transform.inl @@ -63,16 +63,6 @@ namespace AZ return result; } - AZ_MATH_INLINE Transform Transform::CreateScale(const Vector3& scale) - { - AZ_WarningOnce("Transform", false, "CreateScale is deprecated, please use CreateUniformScale instead."); - Transform result; - result.m_rotation = Quaternion::CreateIdentity(); - result.m_scale = scale; - result.m_translation = Vector3::CreateZero(); - return result; - } - AZ_MATH_INLINE Transform Transform::CreateUniformScale(float scale) { Transform result; @@ -171,12 +161,6 @@ namespace AZ return m_scale.GetMaxElement(); } - AZ_MATH_INLINE void Transform::SetScale(const Vector3& scale) - { - AZ_WarningOnce("Transform", false, "SetScale is deprecated, please use SetUniformScale instead."); - m_scale = scale; - } - AZ_MATH_INLINE void Transform::SetUniformScale(const float scale) { m_scale = Vector3(scale); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp index cd08a95af7..b3f691a62f 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp @@ -39,7 +39,7 @@ namespace AzToolsFramework AZ::Transform result; result.SetRotation(m_space.GetRotation() * localTransform.GetRotation()); result.SetTranslation(m_space.TransformPoint(m_nonUniformScale * localTransform.GetTranslation())); - result.SetScale(m_space.GetScale() * localTransform.GetUniformScale()); + result.SetUniformScale(m_space.GetUniformScale() * localTransform.GetUniformScale()); return result; }