OpenVDB 13.0.0

Loading...
Searching...
No Matches
openvdb::v13_0::math::internal Namespace Reference

## Classes
union | imath_half_uif
| a type for both C-only programs and C++ to use the same utilities More...
class | half

## Typedefs
typedef union openvdb::v13_0::math::internal::imath_half_uif | imath_half_uif_t
| a type for both C-only programs and C++ to use the same utilities
typedef uint16_t | imath_half_bits_t
| a type for both C-only programs and C++ to use the same utilities
typedef imath_half_bits_t | half
| if we're in a C-only context, alias the half bits type to half

## Functions
static float | imath_half_to_float (imath_half_bits_t h)
static imath_half_bits_t | imath_float_to_half (float f)
OPENVDB_API void | printBits (std::ostream &os, half h)
OPENVDB_API void | printBits (std::ostream &os, float f)
OPENVDB_API void | printBits (char c[19], half h)
OPENVDB_API void | printBits (char c[35], float f)
OPENVDB_API std::ostream & | operator<< (std::ostream &os, half h)
| Output h to os, formatted as a float.
OPENVDB_API std::istream & | operator>> (std::istream &is, half &h)
| Input h from is.
const math::half & | max_impl (const math::half &a, const math::half &b)
template<typename Type>
const Type & | max_impl (const Type &a, const Type &b)
const math::half & | min_impl (const math::half &a, const math::half &b)
template<typename Type>
const Type & | min_impl (const Type &a, const Type &b)

## Typedef Documentation

## ◆ half

typedef imath_half_bits_t half

if we're in a C-only context, alias the half bits type to half

## ◆ imath_half_bits_t

typedef uint16_t imath_half_bits_t

a type for both C-only programs and C++ to use the same utilities

## ◆ imath_half_uif_t

typedef union openvdb::v13_0::math::internal::imath_half_uif imath_half_uif_t

a type for both C-only programs and C++ to use the same utilities

## Function Documentation

## ◆ imath_float_to_half()

imath_half_bits_t imath_float_to_half | ( | float | f | ) |
| inline static

Convert half to float

Note: This only supports the "round to even" rounding mode, which was the only mode supported by the original OpenEXR library

## ◆ imath_half_to_float()

float imath_half_to_float | ( | imath_half_bits_t | h | ) |
| inline static

Convert half to float

## ◆ max_impl() [1/2]

const math::half & max_impl | ( | const math::half & | a,
|  | const math::half & | b )
| inline

## ◆ max_impl() [2/2]

template<typename Type>

const Type & max_impl | ( | const Type & | a,
|  | const Type & | b )
| inline

## ◆ min_impl() [1/2]

const math::half & min_impl | ( | const math::half & | a,
|  | const math::half & | b )
| inline

## ◆ min_impl() [2/2]

template<typename Type>

const Type & min_impl | ( | const Type & | a,
|  | const Type & | b )
| inline

## ◆ operator<<()

OPENVDB_API std::ostream & operator<< | ( | std::ostream & | os,
|  | half | h )

Output h to os, formatted as a float.

## ◆ operator>>()

OPENVDB_API std::istream & operator>> | ( | std::istream & | is,
|  | half & | h )

Input h from is.

## ◆ printBits() [1/4]

OPENVDB_API void printBits | ( | char | c[19],
|  | half | h )

## ◆ printBits() [2/4]

OPENVDB_API void printBits | ( | char | c[35],
|  | float | f )

## ◆ printBits() [3/4]

OPENVDB_API void printBits | ( | std::ostream & | os,
|  | float | f )

## ◆ printBits() [4/4]

OPENVDB_API void printBits | ( | std::ostream & | os,
|  | half | h )