Beispiel #1
0
  AnimUtils(const char* filename)
  {
    m_pScene = mIp.ReadFile(filename, aiProcess_GenSmoothNormals);
    
    if(m_pScene)
      {
	mGlobalInvTf = m_pScene->mRootNode->mTransformation;
	mGlobalInvTf.Inverse();
	
	// only looks at the first mesh and its bones
	if(m_pScene->mMeshes[0]->HasBones()) 
	  {
	    LoadBones(m_pScene->mMeshes[0]);
	  }

	if(m_pScene->HasAnimations())
	  { // Only Load the first Animation
	    BuildChannelDict(m_pScene->mAnimations[0]);
	  }
      }
  }