68
68
#include < memory>
69
69
#include < string>
70
70
71
- namespace rviz_satellite {
71
+ namespace rviz_satellite
72
+ {
72
73
class OverlayObject ;
73
74
74
- class ScopedPixelBuffer {
75
+ class ScopedPixelBuffer
76
+ {
75
77
public:
76
78
explicit ScopedPixelBuffer (Ogre::HardwarePixelBufferSharedPtr pixel_buffer);
77
79
virtual ~ScopedPixelBuffer ();
78
80
virtual Ogre::HardwarePixelBufferSharedPtr getPixelBuffer ();
79
81
virtual QImage getQImage (unsigned int width, unsigned int height);
80
- virtual QImage getQImage (OverlayObject &overlay);
81
- virtual QImage getQImage (unsigned int width, unsigned int height,
82
- QColor &bg_color);
83
- virtual QImage getQImage (OverlayObject &overlay, QColor &bg_color);
82
+ virtual QImage getQImage (OverlayObject & overlay);
83
+ virtual QImage getQImage (unsigned int width, unsigned int height, QColor & bg_color);
84
+ virtual QImage getQImage (OverlayObject & overlay, QColor & bg_color);
84
85
85
86
protected:
86
87
Ogre::HardwarePixelBufferSharedPtr pixel_buffer_;
@@ -96,11 +97,12 @@ enum class HorizontalAlignment : uint8_t { LEFT, RIGHT, CENTER };
96
97
* This class is supposed to be instantiated in the onInitialize method of the
97
98
* rviz_common::Display class.
98
99
*/
99
- class OverlayObject {
100
+ class OverlayObject
101
+ {
100
102
public:
101
103
using SharedPtr = std::shared_ptr<OverlayObject>;
102
104
103
- explicit OverlayObject (const std::string &name);
105
+ explicit OverlayObject (const std::string & name);
104
106
virtual ~OverlayObject ();
105
107
106
108
virtual std::string getName () const ;
@@ -109,22 +111,21 @@ class OverlayObject {
109
111
virtual bool isTextureReady () const ;
110
112
virtual void updateTextureSize (unsigned int width, unsigned int height);
111
113
virtual ScopedPixelBuffer getBuffer ();
112
- virtual void
113
- setPosition (double hor_dist, double ver_dist,
114
- HorizontalAlignment hor_alignment = HorizontalAlignment::LEFT,
115
- VerticalAlignment ver_alignment = VerticalAlignment::TOP);
114
+ virtual void setPosition (
115
+ double hor_dist, double ver_dist, HorizontalAlignment hor_alignment = HorizontalAlignment::LEFT,
116
+ VerticalAlignment ver_alignment = VerticalAlignment::TOP);
116
117
virtual void setDimensions (double width, double height);
117
118
virtual bool isVisible () const ;
118
119
virtual unsigned int getTextureWidth () const ;
119
120
virtual unsigned int getTextureHeight () const ;
120
121
121
122
protected:
122
123
const std::string name_;
123
- Ogre::Overlay *overlay_;
124
- Ogre::PanelOverlayElement *panel_;
124
+ Ogre::Overlay * overlay_;
125
+ Ogre::PanelOverlayElement * panel_;
125
126
Ogre::MaterialPtr panel_material_;
126
127
Ogre::TexturePtr texture_;
127
128
};
128
- } // namespace rviz_satellite
129
+ } // namespace rviz_satellite
129
130
130
- #endif // OVERLAY_UTILS_HPP_
131
+ #endif // OVERLAY_UTILS_HPP_
0 commit comments