OSDN Git Service

6b92c60f99abad4a0f7d9fc63b0bdc8dd0e9f61f
[moflib/moflib.git] / moflib-1.0 / moflib / moflib / mof / GraphicsSchedule.h
1 #pragma once
2 #include "mof/GraphicsObject.h"
3 #include <map>
4 #include <list>
5 #include <boost/shared_ptr.hpp>
6
7 namespace mof{
8
9         typedef boost::shared_ptr<mof::GraphicsObject> GraphicsModelPtr;
10
11         class GraphicsSchedule{
12                 
13                 struct Element{
14                         mof::GraphicsModelPtr pObject;
15                         mof::AnimationResource pAnimation;
16                 };
17                 typedef std::multimap<int , mof::GraphicsSchedule::Element>::iterator MapItr;
18
19                 std::multimap<int , Element> m_map;
20                 std::list<mof::GraphicsModelPtr> m_modelList;
21                 int m_key;
22         public:
23                 GraphicsSchedule();
24                 ~GraphicsSchedule();
25
26                 void update();
27                 void add(int index , mof::GraphicsModelPtr& pObject , mof::AnimationResource& pAnimation);
28                 bool isFinalized();
29                 bool isPlaying();
30                 void clear();
31                 bool isEmpty(){return m_map.empty();}
32
33                 std::list<mof::GraphicsModelPtr>& appendModelList( std::list<mof::GraphicsModelPtr>& modelList);
34
35         };
36
37 };