資源簡介
osg三維引擎+QT gui結合,顯示三維
代碼片段和文件信息
#include?“AdapterWidget.h“
AdapterWidget::AdapterWidget(?QWidget?*?parent?const?char?*?name?const?QGLWidget?*?shareWidget?WindowFlags?f):
QGLWidget(parent?shareWidget?f)
{
_gw?=?new?osgViewer::GraphicsWindowembedded(00width()height());
setFocusPolicy(Qt::ClickFocus);
}
void?AdapterWidget::resizeGL(?int?width?int?height?)
{
_gw->getEventQueue()->windowResize(0?0?width?height?);
_gw->resized(00widthheight);
}
void?AdapterWidget::keyPressEvent(?QKeyEvent*?event?)
{
_gw->getEventQueue()->keyPress(?(osgGA::GUIEventAdapter::KeySymbol)?*(event->text().toAscii().data()?)?);
}
void?AdapterWidget::keyReleaseEvent(?QKeyEvent*?event?)
{
_gw->getEventQueue()->keyRelease(?(osgGA::GUIEventAdapter::KeySymbol)?*(event->text().toAscii().data()?)?);
}
void
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-08-13?16:03??qt_osg\
?????目錄???????????0??2010-08-13?16:04??qt_osg\debug\
?????目錄???????????0??2010-08-04?11:09??qt_osg\qt_osg\
?????文件?????????958??2010-08-04?09:11??qt_osg\qt_osg.sln
?????文件???????12288??2010-08-06?11:28??qt_osg\qt_osg.suo
?????文件????????1713??2010-08-04?09:22??qt_osg\qt_osg\AdapterWidget.cpp
?????文件????????1319??2010-08-04?09:22??qt_osg\qt_osg\AdapterWidget.h
?????目錄???????????0??2010-08-13?16:04??qt_osg\qt_osg\Debug\
?????目錄???????????0??2010-08-04?09:11??qt_osg\qt_osg\GeneratedFiles\
?????目錄???????????0??2010-08-04?09:11??qt_osg\qt_osg\GeneratedFiles\Debug\
?????目錄???????????0??2010-08-04?09:11??qt_osg\qt_osg\GeneratedFiles\Release\
?????文件????????1350??2010-08-04?11:09??qt_osg\qt_osg\main.cpp
?????文件??????????66??2010-08-04?09:11??qt_osg\qt_osg\qt_osg.qrc
?????文件????????5761??2010-08-04?09:24??qt_osg\qt_osg\qt_osg.vcproj
?????文件?????????428??2010-08-04?09:11??qt_osg\qt_osg\qt_osg.vcproj.vspscc
?????文件????????1433??2010-08-06?11:28??qt_osg\qt_osg\qt_osg.vcproj.ZHONGKEY-C4BEFC.ruilaoshi.user
?????目錄???????????0??2010-08-04?09:11??qt_osg\qt_osg\Resources\
?????文件????????1303??2010-08-04?09:22??qt_osg\qt_osg\ViewerQT.h
評論
共有 條評論