Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre/OgreCOMVisual.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_OGRECOMVISUAL_HH_
19 #define IGNITION_RENDERING_OGRE_OGRECOMVISUAL_HH_
20 
21 #include <memory>
22 
27 
28 namespace Ogre
29 {
30  class MovableObject;
31 }
32 
33 namespace ignition
34 {
35  namespace rendering
36  {
37  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
38 
39  // Forward declaration
40  class OgreCOMVisualPrivate;
41 
42  class IGNITION_RENDERING_OGRE_VISIBLE OgreCOMVisual :
43  public BaseCOMVisual<OgreVisual>
44  {
46  protected: OgreCOMVisual();
47 
49  public: virtual ~OgreCOMVisual();
50 
51  // Documentation inherited.
52  public: virtual void Init() override;
53 
54  // Documentation inherited.
55  public: virtual void PreRender() override;
56 
57  // Documentation inherited.
58  public: Ogre::MovableObject *OgreObject() const;
59 
61  public: void CreateVisual();
62 
63  // Documentation inherited
64  public: virtual VisualPtr SphereVisual() const override;
65 
66  // Documentation inherited.
67  public: virtual MaterialPtr Material() const override;
68 
69  // Documentation inherited.
70  public: virtual void SetMaterial(
71  MaterialPtr _material, bool _unique) override;
72 
75  protected: virtual void SetMaterialImpl(OgreMaterialPtr _material);
76 
77  private: friend class OgreScene;
78 
81  };
82  }
83  }
84 }
85 #endif
Base implementation of an center of mass visual.
Definition: gz/rendering/base/BaseCOMVisual.hh:40
Definition: gz/rendering/ogre/OgreCOMVisual.hh:44
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 MaterialPtr Material() const override
Get the material assigned to attached visuals and geometries.
Ogre::MovableObject * OgreObject() const
virtual ~OgreCOMVisual()
Destructor.
virtual void SetMaterialImpl(OgreMaterialPtr _material)
Set material to grid geometry.
void CreateVisual()
Create the Light Visual in Ogre.
virtual void Init() override
Definition: gz/rendering/ogre/OgreScene.hh:41
Definition: gz/rendering/ogre/OgreCamera.hh:28