Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
UnrealMetadataConversions Struct Reference

#include <UnrealMetadataConversions.h>

Static Public Member Functions

static FIntPoint toIntPoint (const glm::ivec2 &vec2)
 
static FIntPoint toIntPoint (const std::string_view &string, const FIntPoint &defaultValue)
 Converts a std::string_view to a FIntPoint.
 
static FVector2D toVector2D (const glm::dvec2 &vec2)
 
static FVector2D toVector2D (const std::string_view &string, const FVector2D &defaultValue)
 Converts a std::string_view to a FVector2D.
 
static FIntVector toIntVector (const glm::ivec3 &vec3)
 
static FIntVector toIntVector (const std::string_view &string, const FIntVector &defaultValue)
 Converts a std::string_view to a FIntVector.
 
static FVector3f toVector3f (const glm::vec3 &vec3)
 
static FVector3f toVector3f (const std::string_view &string, const FVector3f &defaultValue)
 
static FVector toVector (const glm::dvec3 &vec3)
 
static FVector toVector (const std::string_view &string, const FVector &defaultValue)
 
static FVector4 toVector4 (const glm::dvec4 &vec4)
 
static FVector4 toVector4 (const std::string_view &string, const FVector4 &defaultValue)
 
static FMatrix toMatrix (const glm::dmat4 &mat4)
 
template<glm::length_t N, typename T >
static FString toString (const glm::vec< N, T > &from)
 Converts a glm::vecN to a FString.
 
template<glm::length_t N, typename T >
static FString toString (const glm::mat< N, N, T > &from)
 Converts a glm::matN to a FString.
 
static FString toString (const std::string_view &from)
 
static FString toString (const std::string &from)
 

Detailed Description

Definition at line 33 of file UnrealMetadataConversions.h.

Member Function Documentation

◆ toIntPoint() [1/2]

static FIntPoint UnrealMetadataConversions::toIntPoint ( const glm::ivec2 & vec2)
static

◆ toIntPoint() [2/2]

static FIntPoint UnrealMetadataConversions::toIntPoint ( const std::string_view & string,
const FIntPoint & defaultValue )
static

Converts a std::string_view to a FIntPoint.

This expects the values to be written in the "X=... Y=..." format. If this function fails to parse a FIntPoint, the default value is returned.

◆ toIntVector() [1/2]

static FIntVector UnrealMetadataConversions::toIntVector ( const glm::ivec3 & vec3)
static

◆ toIntVector() [2/2]

static FIntVector UnrealMetadataConversions::toIntVector ( const std::string_view & string,
const FIntVector & defaultValue )
static

Converts a std::string_view to a FIntVector.

This expects the values to be written in the "X=... Y=... Z=..." format. If this function fails to parse a FIntVector, the default value is returned.

Parameters
stringThe std::string_view to be parsed.
defaultValueThe default value to be returned if conversion fails.

◆ toMatrix()

static FMatrix UnrealMetadataConversions::toMatrix ( const glm::dmat4 & mat4)
static

◆ toString() [1/4]

template<glm::length_t N, typename T >
static FString UnrealMetadataConversions::toString ( const glm::mat< N, N, T > & from)
inlinestatic

Converts a glm::matN to a FString.

This follows the format that ToString() functions call on the Unreal matrix equivalents. Each row is returned in square brackets, e.g. "[1 2 3 4]", with spaces in-between.

Parameters
fromThe glm::matN to be converted.

Definition at line 109 of file UnrealMetadataConversions.h.

◆ toString() [2/4]

template<glm::length_t N, typename T >
static FString UnrealMetadataConversions::toString ( const glm::vec< N, T > & from)
inlinestatic

Converts a glm::vecN to a FString.

This follows the format that ToString() functions call on the Unreal vector equivalents. For example, a glm::vec3 will return a string in the format "X=... Y=... Z=...".

Parameters
fromThe glm::vecN to be converted.

Definition at line 88 of file UnrealMetadataConversions.h.

◆ toString() [3/4]

static FString UnrealMetadataConversions::toString ( const std::string & from)
static

◆ toString() [4/4]

static FString UnrealMetadataConversions::toString ( const std::string_view & from)
static

◆ toVector() [1/2]

static FVector UnrealMetadataConversions::toVector ( const glm::dvec3 & vec3)
static

◆ toVector() [2/2]

static FVector UnrealMetadataConversions::toVector ( const std::string_view & string,
const FVector & defaultValue )
static

◆ toVector2D() [1/2]

static FVector2D UnrealMetadataConversions::toVector2D ( const glm::dvec2 & vec2)
static

◆ toVector2D() [2/2]

static FVector2D UnrealMetadataConversions::toVector2D ( const std::string_view & string,
const FVector2D & defaultValue )
static

Converts a std::string_view to a FVector2D.

This uses FVector2D::InitFromString, which expects the values to be written in the "X=... Y=..." format. If this function fails to parse a FVector2D, the default value is returned.

◆ toVector3f() [1/2]

static FVector3f UnrealMetadataConversions::toVector3f ( const glm::vec3 & vec3)
static

◆ toVector3f() [2/2]

static FVector3f UnrealMetadataConversions::toVector3f ( const std::string_view & string,
const FVector3f & defaultValue )
static

◆ toVector4() [1/2]

static FVector4 UnrealMetadataConversions::toVector4 ( const glm::dvec4 & vec4)
static

◆ toVector4() [2/2]

static FVector4 UnrealMetadataConversions::toVector4 ( const std::string_view & string,
const FVector4 & defaultValue )
static

The documentation for this struct was generated from the following file: