00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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 ogre_tools
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
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
00122 }
00123
00124 #endif
00125