Sirikata
libogre/src/ManualSkeletonLoader.hpp
Go to the documentation of this file.
00001 // Copyright (c) 2011 Sirikata Authors. All rights reserved.
00002 // Use of this source code is governed by a BSD-style license that can
00003 // be found in the LICENSE file.
00004 
00005 #ifndef _SIRIKATA_OGRE_MANUAL_SKELETON_LOADER_HPP_
00006 #define _SIRIKATA_OGRE_MANUAL_SKELETON_LOADER_HPP_
00007 
00008 #include <sirikata/ogre/Platform.hpp>
00009 #include <sirikata/ogre/Util.hpp>
00010 #include <OgreResource.h>
00011 #include <sirikata/mesh/Meshdata.hpp>
00012 
00013 namespace Sirikata {
00014 namespace Graphics {
00015 
00016 class ManualSkeletonLoader : public Ogre::ManualResourceLoader {
00017 public:
00018     ManualSkeletonLoader(Mesh::MeshdataPtr meshdata, const std::set<String>& animationList);
00019 
00020     
00021     static bool getTRS(const Matrix4x4f& bsm, Ogre::Vector3& translate, Ogre::Quaternion& quaternion, Ogre::Vector3& scale);
00022 
00023     void prepareResource(Ogre::Resource*r) {}
00024     void loadResource(Ogre::Resource *r);
00025 
00026     bool wasSkeletonLoaded() {
00027       return skeletonLoaded;
00028     }
00029 
00030 private:
00031     Mesh::MeshdataPtr mdptr;
00032     bool skeletonLoaded;
00033     const std::set<String>& animations;
00034 };
00035 
00036 
00037 
00038 } // namespace Graphics
00039 } // namespace Sirikata
00040 
00041 #endif //_SIRIKATA_OGRE_MANUAL_SKELETON_LOADER_HPP_