MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / toMagicString

Function toMagicString

CesiumGltfReader/src/GltfReader.cpp:111–119  ·  view source on GitHub ↗

* @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 */

Source from the content-addressed store, hash-verified

109 * @return The string
110 */
111std::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
121GltfReaderResult readBinaryGltf(
122 const CesiumJsonReader::JsonReaderOptions& context,

Callers 1

readBinaryGltfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected