|
发表于 2012-8-9 19:48:50
|
显示全部楼层
osgEarth::Util::Controls和你用什么界面没啥关系
不知道你的代码中有没有这么使用Controls:
ControlCanvas* canvas = new ControlCanvas( &viewer );
root->addChild( canvas );
Grid* grid = new Grid();
canvas->addControl( grid );
grid->setControl( 0, 0, new LabelControl("距离:") );
LabelControl* label = new LabelControl();
label->setFont( osgText::readFontFile( "simhei.ttf" ) );
label->setFontSize( 24.0f );
label->setHorizAlign( Control::ALIGN_LEFT );
label->setText("点击并测量");
grid->setControl( 1, 0, label );
可参考osgEarth自带的案例osgearth_measure、Sample osgearth_controls |
|