From: qw_fuku Date: Tue, 3 Feb 2015 15:26:09 +0000 (+0900) Subject: 動作確認用機能追加 X-Git-Tag: Release4.13~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=12e12dec26dfc069525fc5931e9970c7ec37825d;p=qtgeoviewer%2FQtGeoViewer.git 動作確認用機能追加 --- diff --git a/Src/LibQtGeoViewerCore/Format/AssimpReader.cpp b/Src/LibQtGeoViewerCore/Format/AssimpReader.cpp index 162b995..a543042 100644 --- a/Src/LibQtGeoViewerCore/Format/AssimpReader.cpp +++ b/Src/LibQtGeoViewerCore/Format/AssimpReader.cpp @@ -27,6 +27,8 @@ bool AssimpReader::Load(SceneMain& scene, const std::string& filename) if (!ai_scene) return false; + PlotASNode(ai_scene->mRootNode); + std::string dirpath = lib_geo::Path::GetParentDirPath(filename); BoneMap bone_map; @@ -246,6 +248,27 @@ void AssimpReader::LoadAnimation(const aiScene* ai_scene, BoneMap& bone_map) } } +void AssimpReader::PlotASNode(aiNode* n) +{ + static int layer = 0; + + for (int i = 0; i < layer; ++i) + { + OutputDebugStringA("|"); + } + + OutputDebugStringA("+"); + OutputDebugStringA(n->mName.C_Str()); + OutputDebugStringA("\n"); + + for (unsigned int i = 0; i < n->mNumChildren; ++i) + { + layer++; + PlotASNode(n->mChildren[i]); + layer--; + } +} + // 0•b–¢–ž‚̃L[ƒtƒŒ[ƒ€”‚𐔂¦‚é int AssimpReader::GetNumMinusKeyFrames(const aiNodeAnim* ch) const { diff --git a/Src/LibQtGeoViewerCore/Format/AssimpReader.h b/Src/LibQtGeoViewerCore/Format/AssimpReader.h index d792a16..bf70b00 100644 --- a/Src/LibQtGeoViewerCore/Format/AssimpReader.h +++ b/Src/LibQtGeoViewerCore/Format/AssimpReader.h @@ -33,4 +33,5 @@ private: void SetKeyToBone(aiNodeAnim* ch, geom::Bone* bone); void ApplyASTransform(aiNode* n, aiMatrix4x4& t, std::map& AiToLGMesh); + void PlotASNode(aiNode* n); };