diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
index e1e9bd237d..7eabd6e5e0 100644
--- a/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
+++ b/Code/Framework/AzCore/Tests/Serialization/Json/TransformSerializerTests.cpp
@@ -112,7 +112,7 @@ namespace JsonSerializationTests
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
AZ::Transform expectedTransform =
AZ::Transform::CreateFromQuaternion(AZ::Quaternion(0.25f, 0.5f, 0.75f, 1.0f));
- expectedTransform.SetScale(AZ::Vector3(5.5f));
+ expectedTransform.SetUniformScale(5.5f);
rapidjson::Document json;
json.Parse(R"({ "Rotation": [ 0.25, 0.5, 0.75, 1.0 ], "Scale": 5.5 })");
@@ -128,7 +128,7 @@ namespace JsonSerializationTests
{
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
AZ::Transform expectedTransform = AZ::Transform::CreateTranslation(AZ::Vector3(2.25f, 3.5f, 4.75f));
- expectedTransform.SetScale(AZ::Vector3(5.5f));
+ expectedTransform.SetUniformScale(5.5f);
rapidjson::Document json;
json.Parse(R"({ "Translation": [ 2.25, 3.5, 4.75 ], "Scale": 5.5 })");
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
index 97add27604..a3cc12566f 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Maths/TransformUtils.h
@@ -23,7 +23,7 @@ namespace AzToolsFramework
inline AZ::Transform TransformNormalizedScale(const AZ::Transform& transform)
{
AZ::Transform transformNormalizedScale = transform;
- transformNormalizedScale.SetScale(AZ::Vector3::CreateOne());
+ transformNormalizedScale.SetUniformScale(1.0f);
return transformNormalizedScale;
}
diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp
index 86744ab16d..a1949dd44a 100644
--- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp
+++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp
@@ -2963,7 +2963,7 @@ namespace AzToolsFramework
if (transformIt != transformsBefore.end())
{
AZ::Transform transformBefore = transformIt->second;
- transformBefore.ExtractScale();
+ transformBefore.ExtractUniformScale();
AZ::Transform newWorldFromLocal = transformBefore * scaleTransform;
SetEntityWorldTransform(entityId, newWorldFromLocal);
diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc
index ac55c48a6b..2e60e84326 100644
--- a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc
+++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc
@@ -15,5 +15,7 @@
ArrowDownLine.svg
ArrowUpLine.svg
Backgrounds/FirstTimeBackgroundImage.jpg
+ ArrowDownLine.svg
+ ArrowUpLine.svg
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp
new file mode 100644
index 0000000000..6e9ad42017
--- /dev/null
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp
@@ -0,0 +1,49 @@
+/*
+* 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
+#include
+#include
+#include
+
+namespace O3DE::ProjectManager
+{
+ GemCatalogHeaderWidget::GemCatalogHeaderWidget(GemSortFilterProxyModel* filterProxyModel, QWidget* parent)
+ : QFrame(parent)
+ {
+ QHBoxLayout* hLayout = new QHBoxLayout();
+ hLayout->setAlignment(Qt::AlignLeft);
+ hLayout->setMargin(0);
+ setLayout(hLayout);
+
+ setStyleSheet("background-color: #1E252F;");
+
+ QLabel* titleLabel = new QLabel(tr("Gem Catalog"));
+ titleLabel->setStyleSheet("font-size: 21px;");
+ hLayout->addWidget(titleLabel);
+
+ hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
+
+ AzQtComponents::SearchLineEdit* filterLineEdit = new AzQtComponents::SearchLineEdit();
+ filterLineEdit->setStyleSheet("background-color: #DDDDDD;");
+ connect(filterLineEdit, &QLineEdit::textChanged, this, [=](const QString& text)
+ {
+ filterProxyModel->SetSearchString(text);
+ });
+ hLayout->addWidget(filterLineEdit);
+
+ hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
+ hLayout->addSpacerItem(new QSpacerItem(220, 0, QSizePolicy::Fixed));
+
+ setFixedHeight(60);
+ }
+} // namespace O3DE::ProjectManager
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h
new file mode 100644
index 0000000000..3e065edd8f
--- /dev/null
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h
@@ -0,0 +1,31 @@
+/*
+* 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.
+*
+*/
+
+#pragma once
+
+#if !defined(Q_MOC_RUN)
+#include
+#include
+#endif
+
+namespace O3DE::ProjectManager
+{
+ class GemCatalogHeaderWidget
+ : public QFrame
+ {
+ Q_OBJECT // AUTOMOC
+
+ public:
+ explicit GemCatalogHeaderWidget(GemSortFilterProxyModel* filterProxyModel, QWidget* parent = nullptr);
+ ~GemCatalogHeaderWidget() = default;
+ };
+} // namespace O3DE::ProjectManager
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
index 7d8cee45b4..2d243e7f8b 100644
--- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp
@@ -12,6 +12,8 @@
#include
#include
+#include
+#include
#include
#include
#include
@@ -34,6 +36,9 @@ namespace O3DE::ProjectManager
vLayout->setSpacing(0);
setLayout(vLayout);
+ GemCatalogHeaderWidget* headerWidget = new GemCatalogHeaderWidget(proxyModel);
+ vLayout->addWidget(headerWidget);
+
QHBoxLayout* hLayout = new QHBoxLayout();
hLayout->setMargin(0);
vLayout->addLayout(hLayout);
@@ -64,9 +69,12 @@ namespace O3DE::ProjectManager
GemFilterWidget* filterWidget = new GemFilterWidget(proxyModel);
filterWidget->setFixedWidth(250);
+ GemListHeaderWidget* listHeaderWidget = new GemListHeaderWidget(proxyModel);
+
QVBoxLayout* middleVLayout = new QVBoxLayout();
middleVLayout->setMargin(0);
middleVLayout->setSpacing(0);
+ middleVLayout->addWidget(listHeaderWidget);
middleVLayout->addWidget(m_gemListView);
hLayout->addWidget(filterWidget);
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp
index c6651b7295..3ece7760cf 100644
--- a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp
@@ -124,12 +124,12 @@ namespace O3DE::ProjectManager
{
if (m_collapseButton->isChecked())
{
- m_collapseButton->setIcon(QIcon(":/Resources/ArrowDownLine.svg"));
+ m_collapseButton->setIcon(QIcon(":/ArrowDownLine.svg"));
m_mainWidget->hide();
}
else
{
- m_collapseButton->setIcon(QIcon(":/Resources/ArrowUpLine.svg"));
+ m_collapseButton->setIcon(QIcon(":/ArrowUpLine.svg"));
m_mainWidget->show();
}
}
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
index b96a1f242f..06b0adad32 100644
--- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
@@ -62,20 +62,20 @@ namespace O3DE::ProjectManager
bool IsValid() const;
QString m_path;
- QString m_name;
- QString m_displayName;
+ QString m_name = "Unknown Gem Name";
+ QString m_displayName = "Unknown Gem Name";
AZ::Uuid m_uuid;
- QString m_creator;
+ QString m_creator = "Unknown Creator";
GemOrigin m_gemOrigin = Local;
bool m_isAdded = false; //! Is the gem currently added and enabled in the project?
- QString m_summary;
+ QString m_summary = "No summary provided.";
Platforms m_platforms;
Types m_types; //! Asset and/or Code and/or Tool
QStringList m_features;
QString m_directoryLink;
QString m_documentationLink;
- QString m_version;
- QString m_lastUpdatedDate;
+ QString m_version = "Unknown Version";
+ QString m_lastUpdatedDate = "Unknown Date";
int m_binarySizeInKB = 0;
QStringList m_dependingGemUuids;
QStringList m_conflictingGemUuids;
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp
new file mode 100644
index 0000000000..128fb93345
--- /dev/null
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.cpp
@@ -0,0 +1,78 @@
+/*
+* 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
+#include
+#include
+#include
+#include
+
+namespace O3DE::ProjectManager
+{
+ GemListHeaderWidget::GemListHeaderWidget(GemSortFilterProxyModel* proxyModel, QWidget* parent)
+ : QFrame(parent)
+ {
+ QVBoxLayout* vLayout = new QVBoxLayout();
+ vLayout->setMargin(0);
+ setLayout(vLayout);
+
+ setStyleSheet("background-color: #333333;");
+
+ vLayout->addSpacing(20);
+
+ // Top section
+ QHBoxLayout* topLayout = new QHBoxLayout();
+ topLayout->setMargin(0);
+ topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
+
+ QLabel* showCountLabel = new QLabel();
+ showCountLabel->setStyleSheet("font-size: 11pt; font: italic;");
+ topLayout->addWidget(showCountLabel);
+ connect(proxyModel, &GemSortFilterProxyModel::OnInvalidated, this, [=]
+ {
+ const int numGemsShown = proxyModel->rowCount();
+ showCountLabel->setText(QString(tr("showing %1 Gems")).arg(numGemsShown));
+ });
+
+ topLayout->addSpacing(GemItemDelegate::s_contentMargins.right() + GemItemDelegate::s_borderWidth);
+
+ vLayout->addLayout(topLayout);
+
+ vLayout->addSpacing(20);
+
+ // Separating line
+ QFrame* hLine = new QFrame();
+ hLine->setFrameShape(QFrame::HLine);
+ hLine->setStyleSheet("color: #666666;");
+ vLayout->addWidget(hLine);
+
+ vLayout->addSpacing(GemItemDelegate::s_contentMargins.top());
+
+ // Bottom section
+ QHBoxLayout* columnHeaderLayout = new QHBoxLayout();
+ columnHeaderLayout->setAlignment(Qt::AlignLeft);
+
+ columnHeaderLayout->addSpacing(31);
+
+ QLabel* gemNameLabel = new QLabel(tr("Gem Name"));
+ gemNameLabel->setStyleSheet("font-size: 11pt;");
+ columnHeaderLayout->addWidget(gemNameLabel);
+
+ columnHeaderLayout->addSpacing(111);
+
+ QLabel* gemSummaryLabel = new QLabel(tr("Gem Summary"));
+ gemSummaryLabel->setStyleSheet("font-size: 11pt;");
+ columnHeaderLayout->addWidget(gemSummaryLabel);
+
+ vLayout->addLayout(columnHeaderLayout);
+ }
+} // namespace O3DE::ProjectManager
diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h
new file mode 100644
index 0000000000..b16a654ad0
--- /dev/null
+++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListHeaderWidget.h
@@ -0,0 +1,33 @@
+/*
+* 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.
+*
+*/
+
+#pragma once
+
+#if !defined(Q_MOC_RUN)
+#include
+#include
+#include
+#include
+#endif
+
+namespace O3DE::ProjectManager
+{
+ class GemListHeaderWidget
+ : public QFrame
+ {
+ Q_OBJECT // AUTOMOC
+
+ public:
+ explicit GemListHeaderWidget(GemSortFilterProxyModel* proxyModel, QWidget* parent = nullptr);
+ ~GemListHeaderWidget() = default;
+ };
+} // namespace O3DE::ProjectManager
diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake
index 5fd2b4a9d8..a41ddad21e 100644
--- a/Code/Tools/ProjectManager/project_manager_files.cmake
+++ b/Code/Tools/ProjectManager/project_manager_files.cmake
@@ -58,6 +58,8 @@ set(FILES
Source/LinkWidget.cpp
Source/TagWidget.h
Source/TagWidget.cpp
+ Source/GemCatalog/GemCatalogHeaderWidget.h
+ Source/GemCatalog/GemCatalogHeaderWidget.cpp
Source/GemCatalog/GemCatalogScreen.h
Source/GemCatalog/GemCatalogScreen.cpp
Source/GemCatalog/GemFilterWidget.h
@@ -70,6 +72,8 @@ set(FILES
Source/GemCatalog/GemItemDelegate.cpp
Source/GemCatalog/GemListView.h
Source/GemCatalog/GemListView.cpp
+ Source/GemCatalog/GemListHeaderWidget.h
+ Source/GemCatalog/GemListHeaderWidget.cpp
Source/GemCatalog/GemModel.h
Source/GemCatalog/GemModel.cpp
Source/GemCatalog/GemSortFilterProxyModel.h
diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp
index a20b9c869b..89ca76bd01 100644
--- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp
+++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp
@@ -886,7 +886,7 @@ namespace AZ
}
RHI::Ptr BuildPipelineLayoutDescriptorForApi(
- const char* builderName, const RPI::ShaderResourceGroupLayoutList& srgLayoutList, const MapOfStringToStageType& shaderEntryPoints,
+ [[maybe_unused]] const char* builderName, const RPI::ShaderResourceGroupLayoutList& srgLayoutList, const MapOfStringToStageType& shaderEntryPoints,
const RHI::ShaderCompilerArguments& shaderCompilerArguments, const RootConstantData& rootConstantData,
RHI::ShaderPlatformInterface* shaderPlatformInterface, BindingDependencies& bindingDependencies /*inout*/)
{
diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp
index c4e9306dc9..7c13daea3b 100644
--- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp
+++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp
@@ -318,7 +318,7 @@ namespace AZ
{
AZ::Transform meshTransform = transformFeatureProcessor->GetTransformForId(TransformServiceFeatureProcessorInterface::ObjectId(mesh.first));
AZ::Transform noScaleTransform = meshTransform;
- noScaleTransform.ExtractScale();
+ noScaleTransform.ExtractUniformScale();
AZ::Matrix3x3 rotationMatrix = Matrix3x3::CreateFromTransform(noScaleTransform);
rotationMatrix = rotationMatrix.GetInverseFull().GetTranspose();
diff --git a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp
index acb6e4a287..fb73d0f416 100644
--- a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp
+++ b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp
@@ -231,7 +231,7 @@ namespace AZ
AZ_Error("TransformServiceFeatureProcessor", id.IsValid(), "Attempting to get the transform for an invalid handle.");
AZ::Matrix3x4 matrix3x4 = AZ::Matrix3x4::CreateFromRowMajorFloat12(m_objectToWorldTransforms.at(id.GetIndex()).m_transform);
AZ::Transform transform = AZ::Transform::CreateFromMatrix3x4(matrix3x4);
- transform.ExtractScale();
+ transform.ExtractUniformScale();
return transform;
}
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp
index 138d619d97..4d43d75406 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp
@@ -243,14 +243,14 @@ namespace AZ
{
// apply offset in world-space
finalTransform = m_targetEntityTransform * m_targetBoneTransform;
- finalTransform.SetScale(AZ::Vector3::CreateOne());
+ finalTransform.SetUniformScale(1.0f);
finalTransform *= m_targetOffset;
}
else if (m_scaleSource == AttachmentConfiguration::ScaleSource::TargetEntityScale)
{
// apply offset in target-entity-space (ignoring bone scale)
AZ::Transform boneNoScale = m_targetBoneTransform;
- boneNoScale.SetScale(AZ::Vector3::CreateOne());
+ boneNoScale.SetUniformScale(1.0f);
finalTransform = m_targetEntityTransform * boneNoScale * m_targetOffset;
}
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/CapsuleLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/CapsuleLightDelegate.cpp
index 4ffb917f65..4291ce4d97 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/CapsuleLightDelegate.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/CapsuleLightDelegate.cpp
@@ -35,7 +35,7 @@ namespace AZ
// This equation is based off of the integration of a line segment against a perpendicular normal pointing at the center of the
// line segment from some distance away.
- float scale = GetTransform().GetScale().GetMaxElement();
+ float scale = GetTransform().GetUniformScale();
float h = GetInteriorHeight() * scale;
float t2 = lightThreshold * lightThreshold;
float h2 = h * h;
@@ -54,7 +54,7 @@ namespace AZ
const auto endpoints = m_shapeBus->GetCapsulePoints();
GetFeatureProcessor()->SetCapsuleLineSegment(GetLightHandle(), endpoints.m_begin, endpoints.m_end);
- float scale = GetTransform().GetScale().GetMaxElement();
+ float scale = GetTransform().GetUniformScale();
float radius = m_shapeBus->GetRadius();
GetFeatureProcessor()->SetCapsuleRadius(GetLightHandle(), scale * radius);
}
@@ -62,7 +62,7 @@ namespace AZ
float CapsuleLightDelegate::GetSurfaceArea() const
{
- float scale = GetTransform().GetScale().GetMaxElement();
+ float scale = GetTransform().GetUniformScale();
float radius = m_shapeBus->GetRadius();
float capsArea = 4.0f * Constants::Pi * radius * radius; // both caps make a sphere
float sideArea = 2.0f * Constants::Pi * radius * GetInteriorHeight(); // cylindrical area of capsule
@@ -77,7 +77,7 @@ namespace AZ
float radius = CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity);
// Add on the caps for the attenuation radius
- float scale = GetTransform().GetScale().GetMaxElement();
+ float scale = GetTransform().GetUniformScale();
float height = m_shapeBus->GetHeight() * scale;
debugDisplay.SetColor(color);
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp
index 7805a92cd1..8abc790ada 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp
@@ -48,7 +48,7 @@ namespace AZ::Render
float DiskLightDelegate::GetRadius() const
{
- return m_shapeBus->GetRadius() * GetTransform().GetScale().GetMaxElement();
+ return m_shapeBus->GetRadius() * GetTransform().GetUniformScale();
}
void DiskLightDelegate::DrawDebugDisplay(const Transform& transform, const Color& /*color*/, AzFramework::DebugDisplayRequests& debugDisplay, bool isSelected) const
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp
index a40557f2f1..308a4ebd11 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp
@@ -217,7 +217,7 @@ namespace AZ
GetEntityId(),
&TransformBus::Events::GetWorldTM);
- transform.ExtractScale();
+ transform.ExtractUniformScale();
const Vector3 origin = transform.GetTranslation();
const Vector3 originOffset = origin - (transform.TransformVector(forward) * arrowOffset);
const Vector3 target = origin - (transform.TransformVector(forward) * (arrowLength + arrowOffset));
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/PolygonLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/PolygonLightDelegate.cpp
index e01559041c..0cc01f4066 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/PolygonLightDelegate.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/PolygonLightDelegate.cpp
@@ -73,7 +73,7 @@ namespace AZ
twiceArea += vertices.at(i).GetX() * vertices.at(j).GetY();
twiceArea -= vertices.at(i).GetY() * vertices.at(j).GetX();
}
- float scale = GetTransform().GetScale().GetMaxElement();
+ float scale = GetTransform().GetUniformScale();
return GetAbs(twiceArea * 0.5f * scale * scale);
}
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp
index e3cf1fac78..afb63dce9b 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp
@@ -50,7 +50,7 @@ namespace AZ
float SphereLightDelegate::GetRadius() const
{
- return m_shapeBus->GetRadius() * GetTransform().GetScale().GetMaxElement();
+ return m_shapeBus->GetRadius() * GetTransform().GetUniformScale();
}
void SphereLightDelegate::DrawDebugDisplay(const Transform& transform, const Color& color, AzFramework::DebugDisplayRequests& debugDisplay, bool isSelected) const
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp
index 2c44124564..72cc765238 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp
@@ -228,7 +228,7 @@ namespace AZ
// remove scale
Transform worldNoScale = world;
- worldNoScale.ExtractScale();
+ worldNoScale.ExtractUniformScale();
AZ::Matrix3x4 transformMatrix = AZ::Matrix3x4::CreateFromTransform(worldNoScale);
transformMatrix.StoreToRowMajorFloat12(matrix);
diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/PhysicalSkyComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/PhysicalSkyComponentController.cpp
index 4a6b1608a4..192c1ad509 100644
--- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/PhysicalSkyComponentController.cpp
+++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/PhysicalSkyComponentController.cpp
@@ -218,7 +218,7 @@ namespace AZ
SunPosition PhysicalSkyComponentController::GetSunTransform(const AZ::Transform& world)
{
Transform worldNoScale = world;
- worldNoScale.ExtractScale();
+ worldNoScale.ExtractUniformScale();
AZ::Vector3 sunPositionAtom = worldNoScale.TransformVector(AZ::Vector3(0, -1, 0)); // transform Sun from default position
// Convert sun position to Y-up coordinate
diff --git a/Gems/Blast/Code/Source/Actor/BlastActorImpl.cpp b/Gems/Blast/Code/Source/Actor/BlastActorImpl.cpp
index 0336ae8c09..6c4c78c412 100644
--- a/Gems/Blast/Code/Source/Actor/BlastActorImpl.cpp
+++ b/Gems/Blast/Code/Source/Actor/BlastActorImpl.cpp
@@ -68,7 +68,7 @@ namespace Blast
auto transform = AZ::Transform::CreateFromQuaternionAndTranslation(
m_bodyConfiguration.m_orientation, m_bodyConfiguration.m_position);
- transform.MultiplyByScale(AZ::Vector3(m_scale));
+ transform.MultiplyByUniformScale(m_scale);
AZ::TransformBus::Event(m_entity->GetId(), &AZ::TransformInterface::SetWorldTM, transform);
diff --git a/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp b/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp
index 5fe1e0ab30..25c0f904e3 100644
--- a/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp
+++ b/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp
@@ -202,7 +202,7 @@ namespace Blast
if (parentBody)
{
parentTransform = parentBody->GetTransform();
- parentTransform.MultiplyByScale(AZ::Vector3(m_initialTransform.GetScale().GetMaxElement()));
+ parentTransform.MultiplyByUniformScale(m_initialTransform.GetUniformScale());
}
else
{
@@ -254,7 +254,7 @@ namespace Blast
actorDesc.m_parentCenterOfMass = transform.GetTranslation();
actorDesc.m_parentLinearVelocity = AZ::Vector3::CreateZero();
actorDesc.m_bodyConfiguration = configuration;
- actorDesc.m_scale = transform.GetScale().GetMaxElement();
+ actorDesc.m_scale = transform.GetUniformScale();
return actorDesc;
}
diff --git a/Gems/LmbrCentral/Code/Source/Shape/CapsuleShape.cpp b/Gems/LmbrCentral/Code/Source/Shape/CapsuleShape.cpp
index e935ed4009..1026c8addc 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/CapsuleShape.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/CapsuleShape.cpp
@@ -203,7 +203,7 @@ namespace LmbrCentral
const AZ::Transform& currentTransform, const CapsuleShapeConfig& configuration,
[[maybe_unused]] const AZ::Vector3& currentNonUniformScale)
{
- const float entityScale = currentTransform.GetScale().GetMaxElement();
+ const float entityScale = currentTransform.GetUniformScale();
m_axisVector = currentTransform.GetBasisZ().GetNormalizedSafe() * entityScale;
const float internalCylinderHeight = configuration.m_height - configuration.m_radius * 2.0f;
diff --git a/Gems/LmbrCentral/Code/Source/Shape/CylinderShape.cpp b/Gems/LmbrCentral/Code/Source/Shape/CylinderShape.cpp
index 047261862f..a0ba157fc1 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/CylinderShape.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/CylinderShape.cpp
@@ -273,7 +273,7 @@ namespace LmbrCentral
const AZ::Transform& currentTransform, const CylinderShapeConfig& configuration,
[[maybe_unused]] const AZ::Vector3& currentNonUniformScale)
{
- const float entityScale = currentTransform.GetScale().GetMaxElement();
+ const float entityScale = currentTransform.GetUniformScale();
m_axisVector = currentTransform.GetBasisZ().GetNormalizedSafe() * entityScale;
m_baseCenterPoint = currentTransform.GetTranslation() - m_axisVector * (configuration.m_height * 0.5f);
m_axisVector = m_axisVector * configuration.m_height;
diff --git a/Gems/LmbrCentral/Code/Source/Shape/DiskShape.cpp b/Gems/LmbrCentral/Code/Source/Shape/DiskShape.cpp
index a302a83316..6aff6ed98c 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/DiskShape.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/DiskShape.cpp
@@ -167,7 +167,7 @@ namespace LmbrCentral
{
m_position = currentTransform.GetTranslation();
m_normal = currentTransform.GetBasisZ().GetNormalized();
- m_radius = configuration.m_radius * currentTransform.GetScale().GetMaxElement();
+ m_radius = configuration.m_radius * currentTransform.GetUniformScale();
}
const DiskShapeConfig& DiskShape::GetDiskConfiguration() const
diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorBoxShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorBoxShapeComponent.cpp
index c0b49b8e55..e323d58c2a 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/EditorBoxShapeComponent.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/EditorBoxShapeComponent.cpp
@@ -174,6 +174,6 @@ namespace LmbrCentral
AZ::Vector3 EditorBoxShapeComponent::GetBoxScale()
{
- return AZ::Vector3(m_boxShape.GetCurrentTransform().GetScale().GetMaxElement() * m_boxShape.GetCurrentNonUniformScale());
+ return AZ::Vector3(m_boxShape.GetCurrentTransform().GetUniformScale() * m_boxShape.GetCurrentNonUniformScale());
}
} // namespace LmbrCentral
diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorSplineComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorSplineComponent.cpp
index 212ec49c93..44ed73733c 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/EditorSplineComponent.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/EditorSplineComponent.cpp
@@ -349,7 +349,7 @@ namespace LmbrCentral
const AZ::Vector3& src, const AZ::Vector3& dir, float& distance)
{
const auto rayIntersectData = IntersectSpline(m_cachedUniformScaleTransform, src, dir, *m_splineCommon.m_spline);
- distance = rayIntersectData.m_rayDistance * m_cachedUniformScaleTransform.GetScale().GetMaxElement();
+ distance = rayIntersectData.m_rayDistance * m_cachedUniformScaleTransform.GetUniformScale();
AzFramework::CameraState cameraState;
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::EventResult(
diff --git a/Gems/LmbrCentral/Code/Source/Shape/SphereShape.cpp b/Gems/LmbrCentral/Code/Source/Shape/SphereShape.cpp
index c06d38a612..05472df8be 100644
--- a/Gems/LmbrCentral/Code/Source/Shape/SphereShape.cpp
+++ b/Gems/LmbrCentral/Code/Source/Shape/SphereShape.cpp
@@ -136,7 +136,7 @@ namespace LmbrCentral
[[maybe_unused]] const AZ::Vector3& currentNonUniformScale)
{
m_position = currentTransform.GetTranslation();
- m_radius = configuration.m_radius * currentTransform.GetScale().GetMaxElement();
+ m_radius = configuration.m_radius * currentTransform.GetUniformScale();
}
void DrawSphereShape(
diff --git a/Gems/PhysX/Code/Editor/DebugDraw.cpp b/Gems/PhysX/Code/Editor/DebugDraw.cpp
index fffb1e1350..b73e3f22bd 100644
--- a/Gems/PhysX/Code/Editor/DebugDraw.cpp
+++ b/Gems/PhysX/Code/Editor/DebugDraw.cpp
@@ -685,7 +685,7 @@ namespace PhysX
// Let each collider decide how to scale itself, so extract the scale here.
AZ::Transform entityWorldTransformWithoutScale = AZ::Transform::CreateIdentity();
AZ::TransformBus::EventResult(entityWorldTransformWithoutScale, m_entityId, &AZ::TransformInterface::GetWorldTM);
- entityWorldTransformWithoutScale.ExtractScale();
+ entityWorldTransformWithoutScale.ExtractUniformScale();
auto* physXDebug = AZ::Interface::Get();
if (physXDebug == nullptr)
diff --git a/Gems/PhysX/Code/Editor/EditorSubComponentModeSnapRotation.cpp b/Gems/PhysX/Code/Editor/EditorSubComponentModeSnapRotation.cpp
index 502d60d8d9..e8e93e0d6e 100644
--- a/Gems/PhysX/Code/Editor/EditorSubComponentModeSnapRotation.cpp
+++ b/Gems/PhysX/Code/Editor/EditorSubComponentModeSnapRotation.cpp
@@ -89,7 +89,7 @@ namespace PhysX
AZ::Transform worldTransform = AZ::Transform::CreateIdentity();
AZ::TransformBus::EventResult(
worldTransform, m_entityComponentId.GetEntityId(), &AZ::TransformInterface::GetWorldTM);
- worldTransform.ExtractScale();
+ worldTransform.ExtractUniformScale();
AZ::Transform localTransform = AZ::Transform::CreateIdentity();
EditorJointRequestBus::EventResult(
diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp
index e9b9c41da3..26700a7103 100644
--- a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp
+++ b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp
@@ -603,7 +603,7 @@ namespace PhysX
}
AZ::Transform colliderTransform = GetWorldTM();
- colliderTransform.ExtractScale();
+ colliderTransform.ExtractUniformScale();
AzPhysics::StaticRigidBodyConfiguration configuration;
configuration.m_orientation = colliderTransform.GetRotation();
configuration.m_position = colliderTransform.GetTranslation();
diff --git a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp
index efd65181da..f68c4d17d8 100644
--- a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp
+++ b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp
@@ -365,7 +365,7 @@ namespace PhysX
}
AZ::Transform colliderTransform = GetWorldTM();
- colliderTransform.ExtractScale();
+ colliderTransform.ExtractUniformScale();
AzPhysics::RigidBodyConfiguration configuration = m_config;
configuration.m_orientation = colliderTransform.GetRotation();
diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp
index 379afc3f2d..692fbf96f3 100644
--- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp
+++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp
@@ -205,7 +205,7 @@ namespace PhysX
}
AZ::Transform transform = GetWorldTM();
- transform.ExtractScale();
+ transform.ExtractUniformScale();
const size_t numPoints = m_geometryCache.m_cachedSamplePoints.size();
for (size_t pointIndex = 0; pointIndex < numPoints; ++pointIndex)
{
diff --git a/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.cpp b/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.cpp
index 3987936b8c..430ef7aef3 100644
--- a/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.cpp
+++ b/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.cpp
@@ -196,7 +196,7 @@ namespace PhysX
AZ::Transform::CreateFromQuaternionAndTranslation(colliderConfiguration.m_rotation, colliderConfiguration.m_position);
AZ::Transform shapeTransform = *m_transform;
- shapeTransform.ExtractScale();
+ shapeTransform.ExtractUniformScale();
shapeTransform = existingTransform * shapeTransform;
diff --git a/Gems/PhysX/Code/Source/Utils.cpp b/Gems/PhysX/Code/Source/Utils.cpp
index a85426d532..55be7c92f7 100644
--- a/Gems/PhysX/Code/Source/Utils.cpp
+++ b/Gems/PhysX/Code/Source/Utils.cpp
@@ -718,7 +718,7 @@ namespace PhysX
const float boundsInflationFactor = 1.0f;
AZ::Transform overallTransformNoScale = GetColliderWorldTransform(worldTransform,
colliderConfiguration.m_position, colliderConfiguration.m_rotation);
- overallTransformNoScale.ExtractScale();
+ overallTransformNoScale.ExtractUniformScale();
const physx::PxBounds3 bounds = physx::PxGeometryQuery::getWorldBounds(geometryHolder.any(),
PxMathConvert(overallTransformNoScale),
boundsInflationFactor);
@@ -1378,7 +1378,7 @@ namespace PhysX
AZ::TransformBus::EventResult(worldTransformWithoutScale
, entityId
, &AZ::TransformInterface::GetWorldTM);
- worldTransformWithoutScale.ExtractScale();
+ worldTransformWithoutScale.ExtractUniformScale();
return worldTransformWithoutScale;
}
@@ -1386,10 +1386,10 @@ namespace PhysX
const AZ::Transform& entityWorldTransform)
{
AZ::Transform jointWorldTransformWithoutScale = jointWorldTransform;
- jointWorldTransformWithoutScale.ExtractScale();
+ jointWorldTransformWithoutScale.ExtractUniformScale();
AZ::Transform entityWorldTransformWithoutScale = entityWorldTransform;
- entityWorldTransformWithoutScale.ExtractScale();
+ entityWorldTransformWithoutScale.ExtractUniformScale();
AZ::Transform entityWorldTransformInverse = entityWorldTransformWithoutScale.GetInverse();
return entityWorldTransformInverse * jointWorldTransformWithoutScale;
@@ -1399,10 +1399,10 @@ namespace PhysX
const AZ::Transform& entityWorldTransform)
{
AZ::Transform jointLocalTransformWithoutScale = jointLocalTransform;
- jointLocalTransformWithoutScale.ExtractScale();
+ jointLocalTransformWithoutScale.ExtractUniformScale();
AZ::Transform entityWorldTransformWithoutScale = entityWorldTransform;
- entityWorldTransformWithoutScale.ExtractScale();
+ entityWorldTransformWithoutScale.ExtractUniformScale();
return entityWorldTransformWithoutScale * jointLocalTransformWithoutScale;
}
diff --git a/Gems/Vegetation/Code/Source/DynamicSliceInstanceSpawner.cpp b/Gems/Vegetation/Code/Source/DynamicSliceInstanceSpawner.cpp
index 597d0ca079..a185c9a601 100644
--- a/Gems/Vegetation/Code/Source/DynamicSliceInstanceSpawner.cpp
+++ b/Gems/Vegetation/Code/Source/DynamicSliceInstanceSpawner.cpp
@@ -309,7 +309,7 @@ namespace Vegetation
// Create a Transform that represents our instance.
AZ::Transform world = AZ::Transform::CreateFromQuaternionAndTranslation(instanceData.m_alignment * instanceData.m_rotation, instanceData.m_position);
- world.MultiplyByScale(AZ::Vector3(instanceData.m_scale));
+ world.MultiplyByUniformScale(instanceData.m_scale);
// Request a new dynamic slice instance.
AzFramework::SliceInstantiationTicket* ticket = new AzFramework::SliceInstantiationTicket();
diff --git a/Gems/WhiteBox/Code/Source/Components/WhiteBoxColliderComponent.cpp b/Gems/WhiteBox/Code/Source/Components/WhiteBoxColliderComponent.cpp
index 41d0a4c5e3..cda82c82b0 100644
--- a/Gems/WhiteBox/Code/Source/Components/WhiteBoxColliderComponent.cpp
+++ b/Gems/WhiteBox/Code/Source/Components/WhiteBoxColliderComponent.cpp
@@ -139,7 +139,7 @@ namespace WhiteBox
{
const AZ::Transform worldTransformWithoutScale = [worldTransform = world]() mutable
{
- worldTransform.SetScale(AZ::Vector3::CreateOne());
+ worldTransform.SetUniformScale(1.0f);
return worldTransform;
}();
diff --git a/Gems/WhiteBox/Code/Source/Util/WhiteBoxMathUtil.cpp b/Gems/WhiteBox/Code/Source/Util/WhiteBoxMathUtil.cpp
index 9d423d5519..840d1f4590 100644
--- a/Gems/WhiteBox/Code/Source/Util/WhiteBoxMathUtil.cpp
+++ b/Gems/WhiteBox/Code/Source/Util/WhiteBoxMathUtil.cpp
@@ -73,7 +73,7 @@ namespace WhiteBox
const AZ::Transform spaceFromLocal = localFromSpace.GetInverse();
const AZ::Vector3 spacePosition = spaceFromLocal.TransformPoint(localPosition);
const AZ::Vector3 spaceScaledPosition =
- AZ::Transform::CreateScale(AZ::Vector3(scale)).TransformPoint(spacePosition);
+ AZ::Transform::CreateUniformScale(scale).TransformPoint(spacePosition);
return localFromSpace.TransformPoint(spaceScaledPosition);
}