5#include "CesiumGltf/PropertyTypeTraits.h"
7#include "CesiumUtility/JsonValue.h"
9#include <glm/common.hpp>
31static const std::string VectorComponents =
"XYZW";
42 toIntPoint(
const std::string_view&
string,
const FIntPoint& defaultValue);
52 toVector2D(
const std::string_view&
string,
const FVector2D& defaultValue);
64 toIntVector(
const std::string_view&
string,
const FIntVector& defaultValue);
68 toVector3f(
const std::string_view&
string,
const FVector3f& defaultValue);
70 static FVector
toVector(
const glm::dvec3& vec3);
72 toVector(
const std::string_view&
string,
const FVector& defaultValue);
76 toVector4(
const std::string_view&
string,
const FVector4& defaultValue);
78 static FMatrix
toMatrix(
const glm::dmat4& mat4);
87 template <glm::length_t N,
typename T>
88 static FString
toString(
const glm::vec<N, T>& from) {
90 for (glm::length_t i = 0; i < N; i++) {
94 result += VectorComponents[i];
96 result += std::to_string(from[i]);
98 return FString(result.c_str());
108 template <glm::length_t N,
typename T>
109 static FString
toString(
const glm::mat<N, N, T>& from) {
113 for (glm::length_t r = 0; r < N; r++) {
118 for (glm::length_t c = 0; c < N; c++) {
122 result += std::to_string(from[c][r]);
126 return FString(result.c_str());
129 static FString
toString(
const std::string_view& from);