Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre2/Ogre2InertiaVisual.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 #ifndef IGNITION_RENDERING_OGRE2_OGRE2INERTIAVISUAL_HH_
18 #define IGNITION_RENDERING_OGRE2_OGRE2INERTIAVISUAL_HH_
19 
20 #include <memory>
21 
24 
25 namespace Ogre
26 {
27  class MovableObject;
28 }
29 
30 namespace ignition
31 {
32  namespace rendering
33  {
34  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35 
36  // Forward declaration
37  class Ogre2InertiaVisualPrivate;
38 
40  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2InertiaVisual :
41  public BaseInertiaVisual<Ogre2Visual>
42  {
44  protected: Ogre2InertiaVisual();
45 
47  public: virtual ~Ogre2InertiaVisual();
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 
61  public: void Load(const ignition::math::Pose3d &_pose,
62  const ignition::math::Vector3d &_scale) override;
63 
66  public: VisualPtr BoxVisual() const override;
67 
68  // Documentation inherited.
69  public: virtual MaterialPtr Material() const override;
70 
71  // Documentation inherited.
72  public: virtual void SetMaterial(
73  MaterialPtr _material, bool _unique) override;
74 
77  protected: virtual void SetMaterialImpl(Ogre2MaterialPtr _material);
78 
79  private: friend class Ogre2Scene;
80 
83  };
84  }
85  }
86 }
87 #endif
Base implementation of an inertia visual.
Definition: gz/rendering/base/BaseInertiaVisual.hh:38
Ogre2.x implementation of the inertia visual class.
Definition: gz/rendering/ogre2/Ogre2InertiaVisual.hh:42
virtual ~Ogre2InertiaVisual()
Destructor.
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 void SetMaterialImpl(Ogre2MaterialPtr _material)
Set material to line 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...
virtual void Init() override
Initialize the visual.
VisualPtr BoxVisual() const override
Get the box visual.
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:59
Definition: gz/rendering/ogre/OgreCamera.hh:28