From e8459898a7f887008fe2375673e3cddb39f1d40c Mon Sep 17 00:00:00 2001 From: mbalfour Date: Wed, 14 Apr 2021 16:04:44 -0500 Subject: [PATCH] Exposed Quaternion::CreateFromEulerAnglesDegrees and Transform::Transform(Vector3, Quaternion, Vector3) to the behavior context to improve usability of these classes from scripts. (cherry picked from commit 8156beb21181f9ff20972c8ea8be5e3dc61f1700) --- Code/Framework/AzCore/AzCore/Math/Quaternion.cpp | 3 ++- Code/Framework/AzCore/AzCore/Math/Transform.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp index ca09f8b453..143fe59ca7 100644 --- a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp @@ -258,7 +258,8 @@ namespace AZ Method("CreateFromMatrix3x3", &Quaternion::CreateFromMatrix3x3)-> Method("CreateFromMatrix4x4", &Quaternion::CreateFromMatrix4x4)-> Method("CreateFromAxisAngle", &Quaternion::CreateFromAxisAngle)-> - Method("CreateShortestArc", &Quaternion::CreateShortestArc) + Method("CreateShortestArc", &Quaternion::CreateShortestArc)-> + Method("CreateFromEulerAnglesDegrees", &Quaternion::CreateFromEulerAnglesDegrees) ; } } diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp index 77d8658d0f..bb3f764492 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp @@ -250,6 +250,7 @@ namespace AZ Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::TransformDefaultConstructor)-> + Constructor()-> Method("GetBasis", &Transform::GetBasis)-> Method("GetBasisX", &Transform::GetBasisX)-> Method("GetBasisY", &Transform::GetBasisY)->