00001 #ifndef __AxisGeom__
00002 #define __AxisGeom__
00003
00004 #include <osg/Geometry>
00005 #include <osg/StateSet>
00006 #include <osg/Geode>
00007 #include <osg/LineWidth>
00008 #include <osg/PositionAttitudeTransform>
00009
00014 class AxisGeometry:public osg::PositionAttitudeTransform
00015 {
00016 public:
00017 AxisGeometry(osg::Vec3d direction,osg::Vec4d color=osg::Vec4d(0.5,0.5,0.5,1.0), double length=1.0, bool doubleSided=false);
00018 virtual ~AxisGeometry(void);
00019
00021 void setLength(double length);
00023 void setLineWidth(float width);
00025 osg::Vec3d getDirection();
00026
00027
00028 protected:
00029
00030 void createGeometry();
00031
00032 double _length;
00033 osg::Vec3d _direction;
00034
00035 osg::Vec3Array* _vertices;
00036 osg::Vec4Array* _color;
00037
00038 osg::LineWidth* _linewidth;
00039
00040 };
00041
00042
00043 #endif