#ifndef _ITF_ANIMATIONLOADER_H_ #define _ITF_ANIMATIONLOADER_H_ #ifndef _ITF_ANIMPACKERCONFIGURATION_H_ #include "AnimTexPacker/AnimPackerConfiguration.h" #endif #ifndef _ITF_RESOURCEMANAGER_H_ #include "engine/resources/ResourceManager.h" #endif //_ITF_RESOURCEMANAGER_H_ #ifndef _ITF_PATCHDEPOT_H_ #include "AnimTexPacker/PatchDepot.h" #endif #ifndef _ITF_PBKMERGERLIST_H_ #include "AnimTexPacker/PbkMergerList.h" #endif #ifndef _ITF_SUBANIMLIGHTSET_H_ #include "engine/animation/SubAnimSet.h" #endif //_ITF_SUBANIMLIGHTSET_H_ namespace ITF { class AnimTrack; namespace AnimTexPacker { /////////////////////////////////////////////////////////////////////////////////////////// ///Loads, parses, packs a list of animations class AnimationLoader { public: /////////////////////////////////////////////////////////////////////////////////////////// ///Construction AnimationLoader(); /////////////////////////////////////////////////////////////////////////////////////////// ///Destruction ~AnimationLoader(); /////////////////////////////////////////////////////////////////////////////////////////// ///Loads and parse void loadAnimations(const ITF_VECTOR &animPathList, const ITF_VECTOR *_textureBank, u32 _hdDownscaleMask); /////////////////////////////////////////////////////////////////////////////////////////// ///Packs bbool buildPackedMap(const AnimPackerConfiguration &_config, const Platform& _platform); #if !defined(ITF_FINAL) && defined(ITF_WIN32) /////////////////////////////////////////////////////////////////////////////////////////// ///Export GenAnim animations to directory void exportAnimations(const Path& _directory); #endif void cookAnimations(const Path& _directory, const Platform& _platform); /////////////////////////////////////////////////////////////////////////////////////////// u32 getMergeListCount() { return m_mergerList.size(); } /////////////////////////////////////////////////////////////////////////////////////////// PbkMergerList & getMergeList() { return m_mergerList; } /////////////////////////////////////////////////////////////////////////////////////////// ITF_LIST getMergeListPtr(); /////////////////////////////////////////////////////////////////////////////////////////// void modifyAnimations(const AnimPackerConfiguration &_config); /////////////////////////////////////////////////////////////////////////////////////////// void fillUnion(ITF_VECTOR & _loaderList); private: /////////////////////////////////////////////////////////////////////////////////////////// void mayUpdateBoneCount(u32 _boneCount); /////////////////////////////////////////////////////////////////////////////////////////// StringID findSeedBone(const StringID &_boneID); /////////////////////////////////////////////////////////////////////////////////////////// AnimTrack * parseAnimation(SubAnimSet *_subAnimSet,u32 _subIdx, u32 _hdDownscaleMask); private: PatchDepot m_patchDepot; ITF_VECTOR m_boneMaxSizes; SafeArray m_loadedAnimations; ITF_VECTOR m_loadedAnimationPathes; PbkMergerList m_mergerList; SubAnimSet m_subAnimSet; ResourceContainer m_resourceContainer; }; } } #endif