Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre/OgreInertiaVisual.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_OGREINERTIAVISUAL_HH_
19 #define IGNITION_RENDERING_OGRE_OGREINERTIAVISUAL_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 OgreInertiaVisualPrivate;
41 
42  class IGNITION_RENDERING_OGRE_VISIBLE OgreInertiaVisual :
43  public BaseInertiaVisual<OgreVisual>
44  {
46  protected: OgreInertiaVisual();
47 
49  public: virtual ~OgreInertiaVisual();
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 
63  public: void Load(const ignition::math::Pose3d &_pose,
64  const ignition::math::Vector3d &_scale) override;
65 
68  public: VisualPtr BoxVisual() const override;
69 
70  // Documentation inherited.
71  public: virtual MaterialPtr Material() const override;
72 
73  // Documentation inherited.
74  public: virtual void SetMaterial(
75  MaterialPtr _material, bool _unique) override;
76 
79  protected: virtual void SetMaterialImpl(OgreMaterialPtr _material);
80 
81  private: friend class OgreScene;
82 
85  };
86  }
87  }
88 }
89 #endif
Base implementation of an inertia visual.
Definition: gz/rendering/base/BaseInertiaVisual.hh:38
Definition: gz/rendering/ogre/OgreInertiaVisual.hh:44
virtual void SetMaterial(MaterialPtr _material, bool _unique) override
Set the material for all attached visuals and geometries.
void Load(const ignition::math::Pose3d &_pose, const ignition::math::Vector3d &_scale) override
Load the Inertia visual from its pose and scale.
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
virtual ~OgreInertiaVisual()
Destructor.
virtual MaterialPtr Material() const override
Get the material assigned to attached visuals and geometries.
Ogre::MovableObject * OgreObject() const
virtual void SetMaterialImpl(OgreMaterialPtr _material)
Set material to line geometry.
VisualPtr BoxVisual() const override
Get the box visual.
Definition: gz/rendering/ogre/OgreScene.hh:41
Definition: gz/rendering/ogre/OgreCamera.hh:28