grid.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, 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 OGRE_TOOLS_GRID_H
31 #define OGRE_TOOLS_GRID_H
32 
33 #include <stdint.h>
34 
35 #include <vector>
36 
37 #include <OgreColourValue.h>
38 #include <OgreMaterial.h>
39 #include <OgreSharedPtr.h>
40 
41 namespace Ogre
42 {
43 class SceneManager;
44 
45 class ManualObject;
46 class SceneNode;
47 
48 class Any;
49 }
50 
51 namespace rviz
52 {
53 
54 class BillboardLine;
55 
62 class Grid
63 {
64 public:
65  enum Style
66  {
69  };
70 
81  Grid( Ogre::SceneManager* manager, Ogre::SceneNode* parent_node, Style style, uint32_t cell_count, float cell_length, float line_width, const Ogre::ColourValue& color );
82  ~Grid();
83 
84  void create();
85 
91  Ogre::SceneNode* getSceneNode() { return scene_node_; }
92 
96  void setUserData( const Ogre::Any& data );
97 
98  void setStyle(Style style);
99  Style getStyle() { return style_; }
100 
101  void setColor(const Ogre::ColourValue& color);
102  Ogre::ColourValue getColor() { return color_; }
103 
104  void setCellCount(uint32_t count);
105  float getCellCount() { return cell_count_; }
106 
107  void setCellLength(float len);
108  float getCellLength() { return cell_length_; }
109 
110  void setLineWidth(float width);
111  float getLineWidth() { return line_width_; }
112 
113  void setHeight(uint32_t count);
114  uint32_t getHeight() { return height_; }
115 
116 private:
117  Ogre::SceneManager* scene_manager_;
118  Ogre::SceneNode* scene_node_;
119  Ogre::ManualObject* manual_object_;
120 
122 
123  Ogre::MaterialPtr material_;
124 
126  uint32_t cell_count_;
128  float line_width_;
129  uint32_t height_;
130  Ogre::ColourValue color_;
131 };
132 
133 } // namespace rviz
134 
135 #endif
Ogre::SceneNode * getSceneNode()
Get the Ogre scene node associated with this grid.
Definition: grid.h:91
Ogre::ColourValue getColor()
Definition: grid.h:102
An object that displays a multi-segment line strip rendered as billboards.
float getCellCount()
Definition: grid.h:105
uint32_t cell_count_
Definition: grid.h:126
Ogre::MaterialPtr material_
Definition: grid.h:123
uint32_t getHeight()
Definition: grid.h:114
float getCellLength()
Definition: grid.h:108
Ogre::ColourValue color_
Definition: grid.h:130
Style getStyle()
Definition: grid.h:99
BillboardLine * billboard_line_
Definition: grid.h:121
Ogre::SceneNode * scene_node_
The scene node that this grid is attached to.
Definition: grid.h:118
Displays a grid of cells, drawn with lines.
Definition: grid.h:62
float getLineWidth()
Definition: grid.h:111
uint32_t height_
Definition: grid.h:129
Style style_
Definition: grid.h:125
Ogre::ManualObject * manual_object_
The manual object used to draw the grid.
Definition: grid.h:119
float line_width_
Definition: grid.h:128
float cell_length_
Definition: grid.h:127
Ogre::SceneManager * scene_manager_
Definition: grid.h:117


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:51