LineSegments2DVisual.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
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  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef LINES_SEGMENTS_2D_VISUAL_H
31 #define LINES_SEGMENTS_2D_VISUAL_H
32 
33 #include <tuw_geometry_msgs/LineSegments.h>
35 
36 namespace Ogre
37 {
38 class Vector3;
39 class Quaternion;
40 }
41 
42 namespace rviz
43 {
44 //class Arrow;
45 //class Shape;
46 //class Line;
47 class BillboardLine;
48 }
49 
50 namespace tuw_geometry_rviz
51 {
52 
53 // Declare the visual class for this display.
55 {
56 public:
57  // Constructor. Creates the visual stuff and puts it into the
58  // scene, but in an unconfigured state.
59  LineSegments2DVisual ( Ogre::SceneManager* scene_manager, Ogre::SceneNode* parent_node );
60 
61  // Destructor. Removes the visual stuff from the scene.
62  virtual ~LineSegments2DVisual();
63 
64  // Configure the visual to show the data in the message.
65  void setMessage ( const tuw_geometry_msgs::LineSegments::ConstPtr& msg );
66 
67  // Set the pose of the coordinate frame the message refers to.
68  // These could be done inside setMessage(), but that would require
69  // calls to FrameManager and error handling inside setMessage(),
70  // which doesn't seem as clean. This way LineSegments2DVisual is
71  // only responsible for visualization.
72  void setFramePosition ( const Ogre::Vector3& position );
73  void setFrameOrientation ( const Ogre::Quaternion& orientation );
74 
75  // Set the scale of the visual, which is an user-editable
76  // parameter and therefore don't come from the PoseWithCovarianceStamped message.
77  void setScaleSegments ( float scale );
78 
79  // Set the color of the visual's Pose, which is an user-editable
80  // parameter and therefore don't come from the PoseWithCovarianceStamped message.
81  void setColorSegments ( Ogre::ColourValue color );
82 
83  void setWidthSegments ( float width );
84 
85  // Set the color of the visual's variance, which is an user-editable
86  // parameter and therefore don't come from the PoseWithCovarianceStamped message.
87  //void setColorVariance( Ogre::ColourValue color );
88 
89 private:
90  // The object implementing the actual BillboardLine
92 
93  // A SceneNode whose pose is set to match the coordinate frame of
94  // the Imu message header.
95  Ogre::SceneNode* frame_node_;
96 
97  // The SceneManager, kept here only so the destructor can ask it to
98  // destroy the ``frame_node_``.
99  Ogre::SceneManager* scene_manager_;
100 
101 };
102 
103 } // end namespace tuw_pose_rviz_plugin
104 
105 #endif // LINES_SEGMENTS_2D_VISUAL_H
boost::shared_ptr< rviz::BillboardLine > linesegments_
TFSIMD_FORCE_INLINE Vector3()


tuw_geometry_rviz
Author(s): Markus Macsek , Markus Bader
autogenerated on Mon Jun 10 2019 15:40:07