UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
view.h
Go to the documentation of this file.
1 #ifndef UGDK_ACTION_3D_COMPONENT_VIEW_H
2 #define UGDK_ACTION_3D_COMPONENT_VIEW_H
3 
5 #include <OgreVector3.h>
6 #include <vector>
7 #include <utility>
8 
9 namespace Ogre {
10 class Vector3;
11 class Entity;
12 }
13 
14 namespace ugdk {
15 namespace action {
16 namespace mode3d {
17 namespace component {
18 
19 class View : public Component {
20 
21  public:
22  View() {}
23 
24  virtual std::type_index type() const override;
25 
26  Ogre::Entity* AddEntity(const std::string& meshName);
27  Ogre::Entity* AddEntity(const std::string& entName, const std::string& meshName);
28  Ogre::Entity* AddEntity(Ogre::Entity* ent);
29 
30  Ogre::Entity* GetEntity(int index);
31  Ogre::Entity* GetEntity(const std::string& entName);
32 
33  protected:
34  void OnTaken() override;
35 
36  std::vector<std::pair<std::string, std::string>> pending_entities_;
37  std::vector<Ogre::Entity*> entities_;
38 };
39 
40 inline std::type_index View::type() const {
41  return typeid(View);
42 }
43 
44 } // namespace component
45 } // namespace mode3d
46 } // namespace action
47 } // namespace ugdk
48 
49 #endif // UGDK_ACTION_3D_COMPONENT_VIEW_H
virtual std::type_index type() const override
Definition: view.h:40
Definition: animation.h:11
Definition: component.h:14
Ogre::Entity * AddEntity(const std::string &meshName)
Ogre::Entity * GetEntity(int index)
std::vector< std::pair< std::string, std::string > > pending_entities_
Definition: view.h:36
Definition: camera.h:8
void OnTaken() override
TODO: Make this not accessible from Object.
std::vector< Ogre::Entity * > entities_
Definition: view.h:37