* @brief Creates a string representation for the given magic value. * * The details are not specified, but the output will include a * hex representation of the given value, as well as the result * of interpreting the value as 4 unsigned characters. * * @param i The value * @return The string */
| 109 | * @return The string |
| 110 | */ |
| 111 | std::string toMagicString(uint32_t i) { |
| 112 | const unsigned char c0 = static_cast<unsigned char>(i & 0xFF); |
| 113 | const unsigned char c1 = static_cast<unsigned char>((i >> 8) & 0xFF); |
| 114 | const unsigned char c2 = static_cast<unsigned char>((i >> 16) & 0xFF); |
| 115 | const unsigned char c3 = static_cast<unsigned char>((i >> 24) & 0xFF); |
| 116 | std::stringstream stream; |
| 117 | stream << c0 << c1 << c2 << c3 << " (0x" << std::hex << i << ")"; |
| 118 | return stream.str(); |
| 119 | } |
| 120 | |
| 121 | GltfReaderResult readBinaryGltf( |
| 122 | const CesiumJsonReader::JsonReaderOptions& context, |