cesium-native 0.62.0
Loading...
Searching...
No Matches
CesiumGltf::MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > > Struct Template Reference

Converts from a matN type to another matN type. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

static std::optional< TTo > convert (TFrom from)
 Converts a value of the given matN to another matN type.
 
static std::optional< TTo > convert (TFrom)
 Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.
 

Detailed Description

template<typename TTo, typename TFrom>
struct CesiumGltf::MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >

Converts from a matN type to another matN type.

Definition at line 805 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

template<typename TTo, typename TFrom>
static std::optional< TTo > CesiumGltf::MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >::convert ( TFrom from)
inlinestatic

Converts a value of the given matN to another matN type.

Let M be the length of the given matN, and N be the length of the target matN. If M > N, then only the first N components of the first N columns will be used. Otherwise, if M < N, all other elements in the N x N matrix will be initialized to zero.

If any of the relevant components cannot be converted to the target matN component type, std::nullopt is returned.

Parameters
fromThe matN value to convert from.

Definition at line 825 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< TTo > CesiumGltf::MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >::convert ( TFrom )
inlinestatic

Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.

Definition at line 26 of file MetadataConversions.h.


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