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.
37 lines
905 B
C++
37 lines
905 B
C++
#pragma once
|
|
#include "OBaseOperator.h"
|
|
#include "OSGPeriodicLattice.h"
|
|
#include <osgText/Text>
|
|
#include <osgViewer/Viewer>
|
|
|
|
|
|
namespace OSGView
|
|
{
|
|
|
|
class OpPickZValue : public OBaseOperator
|
|
{
|
|
public:
|
|
OpPickZValue(osgViewer::Viewer* pViewer);
|
|
virtual ~OpPickZValue();
|
|
|
|
virtual const char * GetName() {return "OpMeasureDistance";}
|
|
|
|
virtual int OnMouseMove(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
void SetMeshData(COSGPeriodicLattice* posgMesh);
|
|
protected:
|
|
virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
void SnapPoint(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
|
|
|
|
osgText::Text* createText(const osg::Vec3& pos, double val);
|
|
protected:
|
|
//text ½Úµã
|
|
osg::ref_ptr<osg::Geode> m_textZValue;
|
|
|
|
COSGPeriodicLattice* m_pOsgMesh;
|
|
|
|
osg::Vec3 m_snapPoint;
|
|
};
|
|
|
|
} //end namespace
|