3 changed files with 59 additions and 0 deletions
@ -1,2 +1,3 @@
|
||||
*.png filter=lfs diff=lfs merge=lfs -text |
||||
*.glb filter=lfs diff=lfs merge=lfs -text |
||||
*.blend filter=lfs diff=lfs merge=lfs -text |
||||
|
||||
@ -0,0 +1,38 @@
|
||||
|
||||
#include <cstdio> // snprintf |
||||
#include <iostream> // std::cout |
||||
|
||||
#include <assimp/cimport.h> |
||||
#include <assimp/scene.h> |
||||
#include <assimp/postprocess.h> |
||||
|
||||
#include "dumbLog.h" |
||||
|
||||
|
||||
void |
||||
debugParseNode(aiNode* node, aiMatrix4x4 xform, uint depth=0) |
||||
{ |
||||
depth++; |
||||
char tabs[256]; |
||||
snprintf(tabs, 256, "%*s", depth * 4, " "); |
||||
std::cout << tabs << node->mName.C_Str() << ", has meshes: " << (node->mNumMeshes > 0) << "\n"; |
||||
|
||||
for (uint i = 0; i < node->mNumChildren; i++) |
||||
debugParseNode(node->mChildren[i], xform, depth); |
||||
} |
||||
|
||||
void |
||||
logDebugAnimationInfo(const char* model_name) |
||||
{ |
||||
const aiScene* scene = aiImportFile(model_name, aiProcessPreset_TargetRealtime_MaxQuality); |
||||
|
||||
if (!scene) { |
||||
LOG(Error) << "Error loading file: " << model_name << "\n"; |
||||
return; |
||||
} |
||||
|
||||
std::cout << "\n\n--------------------------------------\n"; |
||||
aiMatrix4x4 identity_mat; |
||||
debugParseNode(scene->mRootNode, identity_mat); |
||||
std::cout << "--------------------------------------\n\n\n"; |
||||
} |
||||
Loading…
Reference in new issue