00001 #ifndef __ManipAxis__
00002 #define __ManipAxis__
00003
00004 #include "KnobGeometry.h"
00005 #include "AxisGeometry.h"
00006
00007 #define KNOB_SCALE_FACTOR 20
00008
00012 class ManipulationAxis:public osg::PositionAttitudeTransform
00013 {
00014 public:
00015 ManipulationAxis(std::string &name, osg::Vec3d direction,osg::Vec4d color=osg::Vec4d(0.5,0.5,0.5,1.0), double length=1.0, double radius=0.2);
00016 virtual ~ManipulationAxis(void);
00017
00019 void setLength(double length);
00020 double getLength();
00022 void setRadius(double radius);
00023
00024 osg::Vec3d getAxisDirection();
00025
00026 osg::Node* getKnob();
00027
00028 private:
00029 double _length;
00030 osg::ref_ptr<KnobGeometry> _knob;
00031 osg::ref_ptr<AxisGeometry> _axis;
00032 };
00033
00034 #endif