Gazebo Rendering

API Reference

6.6.3
gz/rendering/ogre/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 GZ_RENDERING_OGRE_OGREMESHFACTORY_HH_
18 #define GZ_RENDERING_OGRE_OGREMESHFACTORY_HH_
19 
20 #include <string>
21 #include <vector>
22 
25 #include "gz/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 
61  public: void ClearMaterialsCache(const std::string &_name);
62 
63  protected: OgreScenePtr scene;
64 
68  };
69 
70  class IGNITION_RENDERING_OGRE_VISIBLE OgreSubMeshStoreFactory
71  {
73 
75  Ogre::Entity *_entity);
76 
77  public: virtual ~OgreSubMeshStoreFactory();
78 
79  public: virtual OgreSubMeshStorePtr Create();
80 
81  protected: virtual OgreSubMeshPtr CreateSubMesh(unsigned int _index);
82 
83  protected: virtual void CreateNameList();
84 
85  protected: virtual void PopulateDefaultNames();
86 
87  protected: virtual void PopulateGivenNames();
88 
89  protected: OgreScenePtr scene;
90 
91  protected: Ogre::Entity *ogreEntity;
92 
93  protected: NameList names;
94  };
95  }
96  }
97 }
98 #endif
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
STL class.
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
STL class.
OgreScenePtr scene
Definition: gz/rendering/ogre/OgreMeshFactory.hh:89
OgreScenePtr scene
Definition: gz/rendering/ogre/OgreMeshFactory.hh:63
Definition: gz/rendering/ogre/OgreMeshFactory.hh:38
std::vector< MaterialPtr > materialCache
Vector with the template materials, we keep the pointer to be able to remove it when nobody is using ...
Definition: gz/rendering/ogre/OgreMeshFactory.hh:67
NameList names
Definition: gz/rendering/ogre/OgreMeshFactory.hh:93
Ogre::Entity * ogreEntity
Definition: gz/rendering/ogre/OgreMeshFactory.hh:91
Definition: gz/rendering/ogre/OgreMeshFactory.hh:70