Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre2/Ogre2COMVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 
18 #ifndef IGNITION_RENDERING_OGRE_OGRE2COMVISUAL_HH_
19 #define IGNITION_RENDERING_OGRE_OGRE2COMVISUAL_HH_
20 
21 #include <memory>
22 
25 
26 namespace Ogre
27 {
28  class MovableObject;
29 }
30 
31 namespace ignition
32 {
33  namespace rendering
34  {
35  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
36 
37  // Forward declaration
38  class Ogre2COMVisualPrivate;
39 
40  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2COMVisual :
41  public BaseCOMVisual<Ogre2Visual>
42  {
44  protected: Ogre2COMVisual();
45 
47  public: virtual ~Ogre2COMVisual();
48 
49  // Documentation inherited.
50  public: virtual void Init() override;
51 
52  // Documentation inherited.
53  public: virtual void PreRender() override;
54 
55  // Documentation inherited.
56  protected: virtual void Destroy() override;
57 
59  public: void CreateVisual();
60 
61  // Documentation inherited
62  public: virtual VisualPtr SphereVisual() const override;
63 
64  // Documentation inherited.
65  public: virtual MaterialPtr Material() const override;
66 
67  // Documentation inherited.
68  public: virtual void SetMaterial(
69  MaterialPtr _material, bool _unique) override;
70 
73  protected: virtual void SetMaterialImpl(Ogre2MaterialPtr _material);
74 
75  private: friend class Ogre2Scene;
76 
79  };
80  }
81  }
82 }
83 #endif
Base implementation of an center of mass visual.
Definition: gz/rendering/base/BaseCOMVisual.hh:40
Definition: gz/rendering/ogre2/Ogre2COMVisual.hh:42
virtual ~Ogre2COMVisual()
Destructor.
virtual void SetMaterial(MaterialPtr _material, bool _unique) override
Set the material for all attached visuals and geometries.
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
virtual VisualPtr SphereVisual() const override
Get the sphere visual.
virtual void SetMaterialImpl(Ogre2MaterialPtr _material)
Set material to grid geometry.
virtual MaterialPtr Material() const override
Get the material assigned to attached visuals and geometries.
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
void CreateVisual()
Create the Light Visual in Ogre.
virtual void Init() override
Initialize the visual.
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:59
Definition: gz/rendering/ogre/OgreCamera.hh:28