Consolidate various to_string implementations for math classes
Signed-off-by: puvvadar <puvvadar@amazon.com>
This commit is contained in:
@@ -9,20 +9,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/std/functional.h>
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
#include <AzCore/Math/MathStringConversions.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class Matrix4x4;
|
||||
class Quaternion;
|
||||
class Transform;
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
class Vector4;
|
||||
}
|
||||
|
||||
namespace MCore
|
||||
{
|
||||
AZStd::string GenerateUniqueString(const char* prefix, const AZStd::function<bool(const AZStd::string& value)>& validationFunction);
|
||||
@@ -46,22 +36,3 @@ namespace MCore
|
||||
static const char* wordSeparators;
|
||||
};
|
||||
}
|
||||
|
||||
namespace AZStd
|
||||
{
|
||||
void to_string(string& str, bool value);
|
||||
void to_string(string& str, const AZ::Vector2& value);
|
||||
void to_string(string& str, const AZ::Vector3& value);
|
||||
void to_string(string& str, const AZ::Vector4& value);
|
||||
void to_string(string& str, const AZ::Quaternion& value);
|
||||
void to_string(string& str, const AZ::Matrix4x4& value);
|
||||
void to_string(string& str, const AZ::Transform& value);
|
||||
|
||||
inline AZStd::string to_string(bool val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Vector2& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Vector3& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Vector4& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Quaternion& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Matrix4x4& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
inline AZStd::string to_string(const AZ::Transform& val) { AZStd::string str; to_string(str, val); return str; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user