00001
00002
00003 #ifndef _JAFAR_VIEWER3D_GRID_HPP_
00004 #define _JAFAR_VIEWER3D_GRID_HPP_
00005
00006 #include <jmath/jblas.hpp>
00007
00008 #include <osg/ref_ptr>
00009
00010 namespace osg {
00011 class Geode;
00012 class Geometry;
00013 class StateSet;
00014 }
00015
00016 namespace jafar {
00017 namespace viewer3d {
00030 class Grid {
00031 public:
00032 Grid( double _size1 = 20.0, double _size2 = 20.0, int _countU = 20, int _countV = 20 );
00033 ~Grid();
00034 public:
00035 osg::Geode* node();
00036 void setColor(double r, double g, double b, double a = 1.0);
00037 private:
00038 double m_size1, m_size2, m_countU, m_countV;
00039 osg::ref_ptr<osg::Geode> m_geode;
00040 osg::ref_ptr<osg::Geometry> m_geometry;
00041 osg::ref_ptr<osg::StateSet> m_set;
00042 };
00043 }
00044 }
00045
00046 #endif