MeshLib C++ Docs
Loading...
Searching...
No Matches
MRScalarConvert.h File Reference
#include "MRMeshFwd.h"
#include "MRBox.h"

Go to the source code of this file.

Namespaces

namespace  MR
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Macros

#define M(T)

Enumerations

enum class  MR::ScalarType {
  MR::ScalarType::UInt8 , MR::ScalarType::Int8 , MR::ScalarType::UInt16 , MR::ScalarType::Int16 ,
  MR::ScalarType::UInt32 , MR::ScalarType::Int32 , MR::ScalarType::UInt64 , MR::ScalarType::Int64 ,
  MR::ScalarType::Float32 , MR::ScalarType::Float64 , MR::ScalarType::Float32_4 , MR::ScalarType::Unknown ,
  MR::ScalarType::Count
}
 scalar value's binary format type More...

Functions

size_t MR::getScalarTypeSize (ScalarType scalarType)
 returns the size in bytes of a value of given type, or 0 for ScalarType::Unknown
MinMaxd MR::getScalarTypeMinMax (ScalarType scalarType)
 returns the minimal and the maximal values of given type, or zeros for ScalarType::Unknown
std::function< float(const char *)> MR::getTypeConverter (ScalarType scalarType, const MinMaxd &range)
template<typename F>
std::invoke_result_t< F, int > MR::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.

Macro Definition Documentation

◆ M

#define M ( T)
Value:
return f( *( const T* )( c ) );