Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre2/Ogre2RenderTargetMaterial.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_OGRE2RENDERTARGETMATERIAL_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2RENDERTARGETMATERIAL_HH_
19 
20 #include <vector>
21 
22 #include "gz/rendering/config.hh"
24 #include "gz/rendering/ogre2/Export.hh"
25 
26 namespace ignition
27 {
28  namespace rendering
29  {
30  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
31  //
44  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2RenderTargetMaterial :
45  public Ogre::RenderTargetListener,
46  public Ogre::MaterialManager::Listener
47  {
52  public: Ogre2RenderTargetMaterial(Ogre::SceneManager *_scene,
53  Ogre::RenderTarget *_renderTarget, Ogre::Material *_material);
54 
56  public: ~Ogre2RenderTargetMaterial();
57 
61  private: virtual void preRenderTargetUpdate(
62  const Ogre::RenderTargetEvent &_evt) override;
63 
67  private: virtual void postRenderTargetUpdate(
68  const Ogre::RenderTargetEvent &_evt) override;
69 
80  public: virtual Ogre::Technique *handleSchemeNotFound(
81  uint16_t _schemeIndex, const Ogre::String &_schemeName,
82  Ogre::Material *_originalMaterial, uint16_t _lodIndex,
83  const Ogre::Renderable *_rend) override;
84 
86  private: Ogre::SceneManager *scene = nullptr;
87 
89  private: Ogre::RenderTarget *renderTarget = nullptr;
90 
92  private: Ogre::Material *material = nullptr;
93 
95  private: Ogre::String schemeName;
96  };
97  }
98  }
99 }
100 
101 #endif
Causes all objects in a scene to be rendered with the same material when rendered by a given RenderTa...
Definition: gz/rendering/ogre2/Ogre2RenderTargetMaterial.hh:44