测量海拔以及两点间路程(十六)
一、DigitalEarthView.cpp
void CDigitalEarthView::OnCheckCheliang()
{
isTestJu = !isTestJu;
mOSG->isTestJu(isTestJu);
}
二、OSGObject.cpp
void COSGObject::isTestJu(bool isTest)
{
theApp.bNeedModify = TRUE;
while(!theApp.bCanModify)Sleep(1);
if(isTest)
{
eh->isStartTest(true);
}
theApp.bNeedModify = FALSE;
}
三、EventHandler.h
#pragma once
#include <osgGA/GUIEventHandler>
#include <osgViewer/Viewer>
#include <osgUtil/LineSegmentIntersector>
#include <osgEarth/MapNode>
#include <osgEarthUtil/Controls>
class CEventHandler : public osgGA::GUIEventHandler
{
public: