axes.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_AXES_H
31 #define OGRE_TOOLS_AXES_H
32 
33 #include "object.h"
34 
35 #include <stddef.h>
36 #include <stdint.h>
37 
38 #include <vector>
39 
40 namespace Ogre
41 {
42 class SceneManager;
43 class SceneNode;
44 class Vector3;
45 class Quaternion;
46 class Any;
47 class ColourValue;
48 }
49 
50 namespace rviz
51 {
52 class Shape;
53 
58 class Axes : public Object
59 {
60 public:
68  Axes( Ogre::SceneManager* manager, Ogre::SceneNode* parent_node = NULL, float length = 1.0f, float radius = 0.1f );
69  virtual ~Axes();
70 
77  void set( float length, float radius );
78 
79  virtual void setOrientation( const Ogre::Quaternion& orientation );
80  virtual void setPosition( const Ogre::Vector3& position );
81  virtual void setScale( const Ogre::Vector3& scale );
82  virtual void setColor( float r, float g, float b, float a );
83  virtual const Ogre::Vector3& getPosition();
84  virtual const Ogre::Quaternion& getOrientation();
85 
90  Ogre::SceneNode* getSceneNode() { return scene_node_; }
91 
95  void setUserData( const Ogre::Any& data );
96 
97  Shape* getXShape() { return x_axis_; }
98  Shape* getYShape() { return y_axis_; }
99  Shape* getZShape() { return z_axis_; }
100 
101  void setXColor(const Ogre::ColourValue& col);
102  void setYColor(const Ogre::ColourValue& col);
103  void setZColor(const Ogre::ColourValue& col);
104  void setToDefaultColors();
105  static const Ogre::ColourValue& getDefaultXColor();
106  static const Ogre::ColourValue& getDefaultYColor();
107  static const Ogre::ColourValue& getDefaultZColor();
108 
109 private:
110 
111  // prohibit copying
112  Axes( const Axes &other ): Object(0) {}
113  Axes& operator=( const Axes &other ) { return *this; }
114 
115  Ogre::SceneNode* scene_node_;
116 
120 
121  static const Ogre::ColourValue default_x_color_;
122  static const Ogre::ColourValue default_y_color_;
123  static const Ogre::ColourValue default_z_color_;
124 };
125 
126 } // namespace rviz
127 
128 #endif
129 
#define NULL
Definition: global.h:37
Shape * getYShape()
Definition: axes.h:98
f
Ogre::SceneNode * scene_node_
Definition: axes.h:115
Shape * y_axis_
Cylinder for the Y-axis.
Definition: axes.h:118
Base class for visible objects, providing a minimal generic interface.
Definition: object.h:49
Shape * x_axis_
Cylinder for the X-axis.
Definition: axes.h:117
TFSIMD_FORCE_INLINE Vector3()
Shape * getXShape()
Definition: axes.h:97
An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue.
Definition: axes.h:58
static const Ogre::ColourValue default_z_color_
Definition: axes.h:123
Axes & operator=(const Axes &other)
Definition: axes.h:113
Shape * z_axis_
Cylinder for the Z-axis.
Definition: axes.h:119
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
Ogre::SceneNode * getSceneNode()
Get the scene node associated with this object.
Definition: axes.h:90
static const Ogre::ColourValue default_y_color_
Definition: axes.h:122
r
static const Ogre::ColourValue default_x_color_
Definition: axes.h:121
Axes(const Axes &other)
Definition: axes.h:112
Shape * getZShape()
Definition: axes.h:99


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