MCPcopy Create free account
hub / github.com/assimp/assimp / isValidASCIIHeader

Function isValidASCIIHeader

code/AssetLib/COB/COBLoader.cpp:118–134  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

116
117// ------------------------------------------------------------------------------------------------
118static bool isValidASCIIHeader(const char *head) {
119 ai_assert(head != nullptr);
120
121 if (strncmp(head, "Caligari ", 9) != 0) {
122 COBImporter::ThrowException("Could not found magic id: `Caligari`");
123 }
124
125 if (strncmp(&head[9], "V00.", 4) != 0) {
126 COBImporter::ThrowException("Could not found Version tag: `V00.`");
127 }
128 ASSIMP_LOG_INFO("File format tag: ", std::string(head + 9, 6));
129 if (head[16] != 'L') {
130 COBImporter::ThrowException("File is big-endian, which is not supported");
131 }
132
133 return true;
134}
135
136// ------------------------------------------------------------------------------------------------
137// Imports the given file into the given scene structure.

Callers 1

InternReadFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected