![]() |
OpenDAFF C++ API
v1.7
Directional Audio File Format
|
Collection of utility functions. More...
#include <DAFFUtils.h>
Static Public Member Functions | |
static void | getLibraryVersion (DAFFVersion &version) |
Get the library version. More... | |
static std::string | StrDirection (int iView, double dAngle1Deg, double dAngle2Deg, int precision=9, int leadingzeros=3) |
Format a direction (angular pair) as a string canonically. More... | |
static std::string | StrDirectionCompact (int iView, double dAngle1Deg, double dAngle2Deg, int precision=9, int leadingzeros=3) |
Format a direction (angular pair) as a string canonically and in more compact form. More... | |
static std::string | StrError (int iErrorcode) |
Return the string corresponding to an errorcode. More... | |
static std::string | StrContentType (int iContentType) |
Returns a string corresponding to a content type. More... | |
static std::string | StrShortContentType (int iContentType) |
Returns a short form string corresponding to a content type e.g. ("ir", "ms", "dft"...) More... | |
static std::string | StrMetadataKeyType (int iKeyType) |
Returns a string corresponding to a metadata key datatype. More... | |
static std::string | StrQuantizationType (int iQuantizationType) |
Returns a string corresponding to a quantization type. More... | |
static void | NormalizeDirection (int iView, float fAngle1DegIn, float fAngle2DegIn, float &fAngle1DegOut, float &fAngle2DegOut) |
Normalize a direction (angular pair) More... | |
static std::string | Float2StrNice (float f, int precision, bool showpos, int leadingzeros=0) |
Converts a single precision floating point into nice std::string. More... | |
static std::string | Double2StrNice (double d, int precision, bool showpos, int leadingzeros=0) |
Converts a double precision floating point into nice std::string. More... | |
static float | grad2radf (float phi) |
static float | rad2gradf (float phi) |
static double | grad2rad (double phi) |
static double | rad2grad (double phi) |
Collection of utility functions.
This purely static class summerizes utility functions. These include convenient type-to-string conversions and normalization functions.
Definition at line 35 of file DAFFUtils.h.
|
static |
Converts a double precision floating point into nice std::string.
Removes trailing zeros and rounds to the 3rd decimal point
Definition at line 49 of file DAFFUtils.cpp.
|
static |
Converts a single precision floating point into nice std::string.
Removes trailing zeros and rounds to the 3rd decimal point
Definition at line 27 of file DAFFUtils.cpp.
|
static |
Get the library version.
Definition at line 18 of file DAFFUtils.cpp.
|
inlinestatic |
Definition at line 109 of file DAFFUtils.h.
|
inlinestatic |
Definition at line 99 of file DAFFUtils.h.
|
static |
Normalize a direction (angular pair)
The methods normalizes directions regarding a spherical coordinate system (data|object) and projects the angles into the following ranges:
[DSC] alpha in [0°,360°), beta in [0°,180°] [OSC] phi in (-180°,180°], elevation in [-90°,+90°]
The method defines canonical forms of directions, which are more easy to interpret (by humans).
Definition at line 217 of file DAFFUtils.cpp.
|
inlinestatic |
Definition at line 114 of file DAFFUtils.h.
|
inlinestatic |
Definition at line 104 of file DAFFUtils.h.
|
static |
Returns a string corresponding to a content type.
Definition at line 166 of file DAFFUtils.cpp.
|
static |
Format a direction (angular pair) as a string canonically.
Format for data view directions [A => alpha, B => beta]: (A123.1°, B123.167°) Format for object view directions [P => phi, T => theta]: (P+123.1°, T-10.167°)
Definition at line 70 of file DAFFUtils.cpp.
|
static |
Format a direction (angular pair) as a string canonically and in more compact form.
Format for data view directions [A => alpha, B => beta]: A123.1° B123.167° Format for object view directions [P => phi, T => theta]: P+123.1° T-10.167°
Definition at line 98 of file DAFFUtils.cpp.
|
static |
Return the string corresponding to an errorcode.
Definition at line 126 of file DAFFUtils.cpp.
|
static |
Returns a string corresponding to a metadata key datatype.
Definition at line 192 of file DAFFUtils.cpp.
|
static |
Returns a string corresponding to a quantization type.
Definition at line 205 of file DAFFUtils.cpp.
|
static |
Returns a short form string corresponding to a content type e.g. ("ir", "ms", "dft"...)
Definition at line 179 of file DAFFUtils.cpp.