marker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, Lukas Pfeifhofer <lukas.pfeifhofer@devlabs.pro>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors
16  * may be used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef MARKER_RVIZ_PLUGIN_MARKER_H
33 #define MARKER_RVIZ_PLUGIN_MARKER_H
34 
35 #include <string>
37 #include "rviz/ogre_helpers/axes.h"
39 
40 namespace Ogre {
41  class SceneManager;
42 
43  class SceneNode;
44 
45  class Entity;
46 }
47 
48 namespace marker_rviz_plugin {
49 
51  public:
53 
54  ~MarkerResources();
55  };
56 
57  class Marker : public rviz::Object {
58  public:
59 
60  Marker(Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node = 0, int id = -1);
61 
62  virtual ~Marker();
63 
64  void setShowAxes(bool showAxes);
65 
66  void setShowMarker(bool showMarker);
67 
68  void setShowLabel(bool showLabel);
69 
70  void setColorLabel(Ogre::ColourValue color);
71 
72  virtual void setColor(float r, float g, float b, float a);
73 
74  virtual void setOrientation(const Ogre::Quaternion &orientation);
75 
76  virtual void setPosition(const Ogre::Vector3 &position);
77 
78  virtual void setScale(const Ogre::Vector3 &scale);
79 
80  virtual const Ogre::Vector3 &getPosition();
81 
82  virtual const Ogre::Quaternion &getOrientation();
83 
84  void setUserData(const Ogre::Any &data);
85 
86  protected:
87  static MarkerResources static_resources_; // load static resources once for this class
88 
89  Ogre::SceneNode *scene_node_;
90  Ogre::SceneNode *markerNode_;
91 
92  Ogre::Entity *markerEntity_;
95  Ogre::SceneNode *text_node_;
96 
97  };
98 
99 }
100 
101 
102 #endif //MARKER_RVIZ_PLUGIN_MARKER_H
Ogre::SceneNode * text_node_
Definition: marker.h:95
Ogre::Entity * markerEntity_
Definition: marker.h:92
rviz::MovableText * text_
Definition: marker.h:94
rviz::Axes * axes_
Definition: marker.h:93
Ogre::SceneNode * markerNode_
Definition: marker.h:90
r
static MarkerResources static_resources_
Definition: marker.h:87
Ogre::SceneNode * scene_node_
Definition: marker.h:89


marker_rviz_plugin
Author(s): Markus Bader, Lukas Pfeifhofer, Markus Macsek
autogenerated on Mon Jun 10 2019 13:54:22