35std::invoke_result_t<F, int>
visitScalarType( F&& f, ScalarType scalarType,
const char* c )
37#define M(T) return f( *( const T* )( c ) );
41 case ScalarType::UInt8:
43 case ScalarType::UInt16:
45 case ScalarType::Int8:
47 case ScalarType::Int16:
49 case ScalarType::Int32:
51 case ScalarType::UInt32:
53 case ScalarType::UInt64:
55 case ScalarType::Int64:
57 case ScalarType::Float32:
59 case ScalarType::Float64:
61 case ScalarType::Float32_4:
62 return f( *((
const float*)c + 3 ) );
63 case ScalarType::Unknown:
65 case ScalarType::Count:
#define MR_UNREACHABLE
Definition MRMeshFwd.h:804
#define MRVOXELS_API
Definition MRVoxelsFwd.h:14
Definition MRCameraOrientationPlugin.h:8
MRVOXELS_API std::function< float(const char *)> getTypeConverter(ScalarType scalarType, Uint64 range, Int64 min)
std::invoke_result_t< F, int > visitScalarType(F &&f, ScalarType scalarType, const char *c)
More general template to pass a single value of specified format scalarType to a generic function f.
Definition MRScalarConvert.h:35