Ignition Rendering

API Reference

5.1.0
OgreMeshFactory.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_OGRE_OGREMESHFACTORY_HH_
18 #define IGNITION_RENDERING_OGRE_OGREMESHFACTORY_HH_
19 
20 #include <string>
21 #include <vector>
22 
25 #include "ignition/rendering/ogre/Export.hh"
26 
27 namespace Ogre
28 {
29  class Entity;
30 }
31 
32 namespace ignition
33 {
34  namespace rendering
35  {
36  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
37  //
38  class IGNITION_RENDERING_OGRE_VISIBLE OgreMeshFactory
39  {
40  public: explicit OgreMeshFactory(OgreScenePtr _scene);
41 
42  public: virtual ~OgreMeshFactory();
43 
44  public: virtual OgreMeshPtr Create(const MeshDescriptor &_desc);
45 
46  protected: virtual Ogre::Entity *OgreEntity(
47  const MeshDescriptor &_desc);
48 
49  protected: virtual bool Load(const MeshDescriptor &_desc);
50 
51  protected: virtual bool IsLoaded(const MeshDescriptor &_desc);
52 
53  protected: virtual bool LoadImpl(const MeshDescriptor &_desc);
54 
55  protected: virtual std::string MeshName(const MeshDescriptor &_desc);
56 
57  protected: virtual bool Validate(const MeshDescriptor &_desc);
58 
59  protected: OgreScenePtr scene;
60  };
61 
62  class IGNITION_RENDERING_OGRE_VISIBLE OgreSubMeshStoreFactory
63  {
65 
67  Ogre::Entity *_entity);
68 
69  public: virtual ~OgreSubMeshStoreFactory();
70 
71  public: virtual OgreSubMeshStorePtr Create();
72 
73  protected: virtual OgreSubMeshPtr CreateSubMesh(unsigned int _index);
74 
75  protected: virtual void CreateNameList();
76 
77  protected: virtual void PopulateDefaultNames();
78 
79  protected: virtual void PopulateGivenNames();
80 
81  protected: OgreScenePtr scene;
82 
83  protected: Ogre::Entity *ogreEntity;
84 
85  protected: NameList names;
86  };
87  }
88  }
89 }
90 #endif
Definition: OgreMeshFactory.hh:62
NameList names
Definition: OgreMeshFactory.hh:85
OgreScenePtr scene
Definition: OgreMeshFactory.hh:59
Describes how a Mesh should be loaded.
Definition: MeshDescriptor.hh:44
Ogre::Entity * ogreEntity
Definition: OgreMeshFactory.hh:83
STL class.
Definition: OgreMeshFactory.hh:38
Definition: OgreCamera.hh:27
OgreScenePtr scene
Definition: OgreMeshFactory.hh:81