Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre2/Ogre2MeshFactory.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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_OGRE2_OGRE2MESHFACTORY_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2MESHFACTORY_HH_
19 
20 #include <string>
21 #include <vector>
22 
23 #include "gz/rendering/config.hh"
27 #include "gz/rendering/ogre2/Export.hh"
28 
29 namespace Ogre
30 {
31  class Item;
32 }
33 
34 namespace ignition
35 {
36  namespace rendering
37  {
38  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
39  //
41  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2MeshFactory
42  {
45  public: explicit Ogre2MeshFactory(Ogre2ScenePtr _scene);
46 
48  public: virtual ~Ogre2MeshFactory();
49 
53  public: virtual Ogre2MeshPtr Create(const MeshDescriptor &_desc);
54 
57  public: virtual void Clear();
58 
61  protected: virtual Ogre::Item *OgreItem(
62  const MeshDescriptor &_desc);
63 
66  protected: virtual bool Load(const MeshDescriptor &_desc);
67 
71  protected: virtual bool IsLoaded(const MeshDescriptor &_desc);
72 
75  protected: virtual bool LoadImpl(const MeshDescriptor &_desc);
76 
79  protected: virtual std::string MeshName(const MeshDescriptor &_desc);
80 
84  protected: virtual bool Validate(const MeshDescriptor &_desc);
85 
88 
90  protected: Ogre2ScenePtr scene;
91  };
92 
94  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2SubMeshStoreFactory
95  {
100  Ogre::Item *_item);
101 
103  public: virtual ~Ogre2SubMeshStoreFactory();
104 
107  public: virtual Ogre2SubMeshStorePtr Create();
108 
112  protected: virtual Ogre2SubMeshPtr CreateSubMesh(unsigned int _index);
113 
115  protected: virtual void CreateNameList();
116 
118  protected: virtual void PopulateDefaultNames();
119 
122  protected: virtual void PopulateGivenNames();
123 
125  protected: Ogre2ScenePtr scene;
126 
128  protected: Ogre::Item *ogreItem = nullptr;
129 
132  };
133  }
134  }
135 }
136 #endif
Ogre2ScenePtr scene
Pointer to the scene object.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:90
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
STL class.
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
std::vector< std::string > names
A list of names associated with each ogre subitem / submesh.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:131
Ogre2.x implementation of a submesh store factory class.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:94
Ogre2.x implementation of the mesh factory class.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:41
Ogre2ScenePtr scene
Pointer to the scene object.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:125
std::vector< std::string > ogreMeshes
A list of ogre meshes created by this factory.
Definition: gz/rendering/ogre2/Ogre2MeshFactory.hh:87