21 #ifndef _OF_COORDINATEAXES_ 22 #define _OF_COORDINATEAXES_ 26 #include <osg/Geometry> 27 #include <osg/ref_ptr> 43 CoordinateAxes(
const std::string &name,
float r,
float g,
float b,
float a = 1.0 );
47 virtual void showContents(
bool showContents);
48 virtual bool getContentsShown()
const;
51 void setAxisLength(
double len);
52 inline double getAxisLength() {
return _axisLength; }
55 void setDrawAxes(
unsigned int axes);
56 inline unsigned int getDrawAxes()
const {
return _drawAxes; }
59 void setTickSpacing(
double major_sp,
double minor_sp);
60 inline double getMajorTickSpacing()
const {
return _majorTickSpacing; }
61 inline double getMinorTickSpacing()
const {
return _minorTickSpacing; }
64 void setTickSize(
unsigned majorSize,
unsigned int minorSize);
67 bool setTickImage(
const std::string &fname);
68 bool setTickShader(
const std::string &fname );
71 virtual const osg::BoundingSphere& getBound()
const;
72 virtual void setColor(
const osg::Vec4 &color );
73 using ReferenceFrame::setColor;
79 void _computeTickAttenuation();
83 void resetTickShader();
86 double _majorTickSpacing, _minorTickSpacing;
87 unsigned int _drawAxes;
89 osg::ref_ptr<osg::Geode> _axesGeode;
90 osg::ref_ptr<osg::Geode> _tickGeode;
92 osg::ref_ptr<osg::Geometry> _axesGeom;
93 osg::ref_ptr<osg::Geometry> _majorTickGeom;
94 osg::ref_ptr<osg::Geometry> _minorTickGeom;
96 osg::ref_ptr<osg::Vec3dArray> _vertices;
97 osg::ref_ptr<osg::Vec4Array> _colors;
99 osg::ref_ptr<osg::Shader> _fragShader;
Definition: CoordinateAxes.hpp:29
A type of ReferenceFrame that displays X, Y, and Z axes.
Definition: CoordinateAxes.hpp:39
Definition: ReferenceFrame.hpp:54