Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre/OgreText.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 
18 #ifndef GZ_RENDERING_OGRE_OGRETEXT_HH_
19 #define GZ_RENDERING_OGRE_OGRETEXT_HH_
20 
21 #include <memory>
22 #include <string>
23 
24 #include <gz/math/AxisAlignedBox.hh>
25 #include <gz/math/Color.hh>
26 
30 #include "gz/rendering/ogre/Export.hh"
31 
32 namespace ignition
33 {
34  namespace rendering
35  {
36  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
37  //
38  class OgreMovableText;
39  class OgreTextPrivate;
40 
42  class IGNITION_RENDERING_OGRE_VISIBLE OgreText
43  : public BaseText<OgreGeometry>
44  {
46  protected: OgreText();
47 
49  public: virtual ~OgreText();
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: virtual Ogre::MovableObject *OgreObject() const override;
59 
60  // Documentation inherited.
61  public: virtual MaterialPtr Material() const override;
62 
63  // Documentation inherited.
64  public: virtual void SetMaterial(MaterialPtr _material, bool _unique)
65  override;
66 
67  // Documentation inherited.
68  public: virtual void SetFontName(const std::string &_font) override;
69 
70  // Documentation inherited.
71  public: virtual void SetTextString(const std::string &_text) override;
72 
73  // Documentation inherited.
74  public: virtual void SetColor(const gz::math::Color &_color)
75  override;
76 
77  // Documentation inherited.
78  public: virtual void SetCharHeight(const float _height) override;
79 
80  // Documentation inherited.
81  public: virtual void SetSpaceWidth(const float _width) override;
82 
83  // Documentation inherited.
84  public: virtual void SetTextAlignment(
85  const TextHorizontalAlign &_horizAlign,
86  const TextVerticalAlign &_vertAlign) override;
87  // Documentation inherited.
88  public: virtual void SetBaseline(const float _baseline) override;
89 
90  // Documentation inherited.
91  public: virtual void SetShowOnTop(const bool _onTop) override;
92 
93  // Documentation inherited.
94  public: virtual gz::math::AxisAlignedBox AABB() const override;
95 
98  protected: virtual void SetMaterialImpl(OgreMaterialPtr _material);
99 
101  private: friend class OgreScene;
102 
105  private: std::unique_ptr<OgreTextPrivate> dataPtr;
106  };
107  }
108  }
109 }
110 #endif
STL class.
STL class.
Definition: gz/rendering/ogre/OgreScene.hh:39
TextVerticalAlign
Text vertical alignment.
Definition: gz/rendering/Text.hh:49
Definition: gz/rendering/ogre/OgreObject.hh:32
Base implementation of a text geometry.
Definition: gz/rendering/base/BaseText.hh:32
Ogre implementation of text geometry.
Definition: gz/rendering/ogre/OgreText.hh:42
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
TextHorizontalAlign
Text Horizontal alignment.
Definition: gz/rendering/Text.hh:37