cesium-native 0.62.0
Loading...
Searching...
No Matches
CesiumGltf::MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > > Struct Template Reference

Converts from a scalar to a bool. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

static std::optional< bool > convert (TFrom from)
 Converts a scalar to a boolean. Zero is converted to false, while nonzero values are converted to true.
 
static std::optional< bool > convert (TFrom)
 Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.
 

Detailed Description

template<typename TFrom>
struct CesiumGltf::MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > >

Converts from a scalar to a bool.

Definition at line 45 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

template<typename TFrom>
static std::optional< bool > CesiumGltf::MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > >::convert ( TFrom from)
inlinestatic

Converts a scalar to a boolean. Zero is converted to false, while nonzero values are converted to true.

Parameters
fromThe scalar to convert from.

Definition at line 55 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< bool > CesiumGltf::MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > >::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: