Ignition Rendering

API Reference

0.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  class IGNITION_RENDERING_OGRE_VISIBLE OgreMeshFactory
37  {
38  public: explicit OgreMeshFactory(OgreScenePtr _scene);
39 
40  public: virtual ~OgreMeshFactory();
41 
42  public: virtual OgreMeshPtr Create(const MeshDescriptor &_desc);
43 
44  protected: virtual Ogre::Entity *OgreEntity(
45  const MeshDescriptor &_desc);
46 
47  protected: virtual bool Load(const MeshDescriptor &_desc);
48 
49  protected: virtual bool IsLoaded(const MeshDescriptor &_desc);
50 
51  protected: virtual bool LoadImpl(const MeshDescriptor &_desc);
52 
53  protected: virtual std::string MeshName(const MeshDescriptor &_desc);
54 
55  protected: virtual bool Validate(const MeshDescriptor &_desc);
56 
57  protected: OgreScenePtr scene;
58  };
59 
60  class IGNITION_RENDERING_OGRE_VISIBLE OgreSubMeshStoreFactory
61  {
63 
65  Ogre::Entity *_entity);
66 
67  public: virtual ~OgreSubMeshStoreFactory();
68 
69  public: virtual OgreSubMeshStorePtr Create();
70 
71  protected: virtual OgreSubMeshPtr CreateSubMesh(unsigned int _index);
72 
73  protected: virtual void CreateNameList();
74 
75  protected: virtual void PopulateDefaultNames();
76 
77  protected: virtual void PopulateGivenNames();
78 
79  protected: OgreScenePtr scene;
80 
81  protected: Ogre::Entity *ogreEntity;
82 
83  protected: NameList names;
84  };
85  }
86 }
87 #endif
Definition: OgreMeshFactory.hh:60
NameList names
Definition: OgreMeshFactory.hh:83
OgreScenePtr scene
Definition: OgreMeshFactory.hh:57
Describes how a Mesh should be loaded.
Definition: MeshDescriptor.hh:38
Ogre::Entity * ogreEntity
Definition: OgreMeshFactory.hh:81
STL class.
Definition: OgreMeshFactory.hh:36
Definition: ArrowVisual.hh:22
OgreScenePtr scene
Definition: OgreMeshFactory.hh:79