You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "OBaseOperator.h"
|
|
|
|
|
|
#include "OSGPeriodicLattice.h"
|
|
|
|
|
|
#include <osgText/Text>
|
|
|
|
|
|
#include <osgViewer/Viewer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace OSGView
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class OpDrawPolyline : public OBaseOperator
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
OpDrawPolyline(osgViewer::Viewer* pViewer);
|
|
|
|
|
|
virtual ~OpDrawPolyline();
|
|
|
|
|
|
|
|
|
|
|
|
virtual const char * GetName() {return "OpMeasureDistance";}
|
|
|
|
|
|
|
|
|
|
|
|
virtual int OnLButtonDown(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
|
|
|
|
|
|
|
|
virtual int OnMouseMove(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
|
|
|
|
|
|
|
|
void GetPolygen(std::vector<Point2D>& polygen);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
|
|
|
|
|
|
|
|
void UpdatePolyline(std::vector<osg::Vec3>& polylines);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
std::vector<osg::Vec3> m_pPolyline;
|
|
|
|
|
|
|
|
|
|
|
|
//text <20>ڵ<EFBFBD>
|
|
|
|
|
|
osg::Group* m_polylineNode;
|
|
|
|
|
|
|
|
|
|
|
|
bool m_bstart;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} //end namespace
|