axes.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, Willow Garage, Inc.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions are met:
00007  *
00008  *     * Redistributions of source code must retain the above copyright
00009  *       notice, this list of conditions and the following disclaimer.
00010  *     * Redistributions in binary form must reproduce the above copyright
00011  *       notice, this list of conditions and the following disclaimer in the
00012  *       documentation and/or other materials provided with the distribution.
00013  *     * Neither the name of the Willow Garage, Inc. nor the names of its
00014  *       contributors may be used to endorse or promote products derived from
00015  *       this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00021  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027  * POSSIBILITY OF SUCH DAMAGE.
00028  */
00029 
00030 #ifndef OGRE_TOOLS_AXES_H
00031 #define OGRE_TOOLS_AXES_H
00032 
00033 #include "object.h"
00034 
00035 #include <stddef.h>
00036 #include <stdint.h>
00037 
00038 #include <vector>
00039 
00040 namespace Ogre
00041 {
00042 class SceneManager;
00043 class SceneNode;
00044 class Vector3;
00045 class Quaternion;
00046 class Any;
00047 class ColourValue;
00048 }
00049 
00050 namespace rviz
00051 {
00052 class Shape;
00053 
00058 class Axes : public Object
00059 {
00060 public:
00068   Axes( Ogre::SceneManager* manager, Ogre::SceneNode* parent_node = NULL, float length = 1.0f, float radius = 0.1f );
00069   virtual ~Axes();
00070 
00077   void set( float length, float radius );
00078 
00079   virtual void setOrientation( const Ogre::Quaternion& orientation );
00080   virtual void setPosition( const Ogre::Vector3& position );
00081   virtual void setScale( const Ogre::Vector3& scale );
00082   virtual void setColor( float r, float g, float b, float a );
00083   virtual const Ogre::Vector3& getPosition();
00084   virtual const Ogre::Quaternion& getOrientation();
00085 
00090   Ogre::SceneNode* getSceneNode() { return scene_node_; }
00091 
00095   void setUserData( const Ogre::Any& data );
00096 
00097   Shape* getXShape() { return x_axis_; }
00098   Shape* getYShape() { return y_axis_; }
00099   Shape* getZShape() { return z_axis_; }
00100 
00101   void setXColor(const Ogre::ColourValue& col);
00102   void setYColor(const Ogre::ColourValue& col);
00103   void setZColor(const Ogre::ColourValue& col);
00104   void setToDefaultColors();
00105   static const Ogre::ColourValue& getDefaultXColor();
00106   static const Ogre::ColourValue& getDefaultYColor();
00107   static const Ogre::ColourValue& getDefaultZColor();
00108 
00109 private:
00110 
00111   // prohibit copying
00112   Axes( const Axes &other ): Object(0) {}
00113   Axes& operator=( const Axes &other ) { return *this; }
00114 
00115   Ogre::SceneNode* scene_node_;
00116 
00117   Shape* x_axis_;      
00118   Shape* y_axis_;      
00119   Shape* z_axis_;      
00120 
00121   static const Ogre::ColourValue default_x_color_;
00122   static const Ogre::ColourValue default_y_color_;
00123   static const Ogre::ColourValue default_z_color_;
00124 };
00125 
00126 } // namespace rviz
00127 
00128 #endif
00129 


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Aug 27 2015 15:02:27