MeshLib C Docs
Loading...
Searching...
No Matches
MRScalarConvert.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_std_function_float_from_const_char_ptr MR_std_function_float_from_const_char_ptr
 
typedef int32_t MR_ScalarType
 scalar value's binary format type
 

Enumerations

enum  {
  MR_ScalarType_UInt8 = 0 , MR_ScalarType_Int8 = 1 , MR_ScalarType_UInt16 = 2 , MR_ScalarType_Int16 = 3 ,
  MR_ScalarType_UInt32 = 4 , MR_ScalarType_Int32 = 5 , MR_ScalarType_UInt64 = 6 , MR_ScalarType_Int64 = 7 ,
  MR_ScalarType_Float32 = 8 , MR_ScalarType_Float64 = 9 , MR_ScalarType_Float32_4 = 10 , MR_ScalarType_Unknown = 11 ,
  MR_ScalarType_Count = 12
}
 

Functions

MRC_API MR_std_function_float_from_const_char_ptrMR_getTypeConverter (MR_ScalarType scalarType, MR_uint64_t range, MR_int64_t min)
 

Typedef Documentation

◆ MR_ScalarType

typedef int32_t MR_ScalarType

scalar value's binary format type

◆ MR_std_function_float_from_const_char_ptr

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
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 

the last value from float[4]

MR_ScalarType_Float32_4 
MR_ScalarType_Unknown 
MR_ScalarType_Count 

Function Documentation

◆ MR_getTypeConverter()

MRC_API MR_std_function_float_from_const_char_ptr * MR_getTypeConverter ( MR_ScalarType scalarType,
MR_uint64_t range,
MR_int64_t min )

get a function to convert binary data of specified format type to a scalar value

Parameters
scalarType- binary format type
range- (for integer types only) the range of possible values
min- (for integer types only) the minimal value Generated from function MR::getTypeConverter. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_float_from_const_char_ptr_Destroy() to free it when you're done using it.