您的位置:首页 > 其它

OSG 添加操作器及功能列表

2013-11-16 16:44 399 查看
本文参考osgChina官网及FreeSouth《OSG程序设计教程》相关信息

//添加一些操作器

 

    osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator; 

    keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::TrackballManipulator() ); 

    keyswitchManipulator->addMatrixManipulator( '2', "Flight", new osgGA::FlightManipulator() ); 

    keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() ); 

   keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() ); 

  viewer.setCameraManipulator( keyswitchManipulator.get() ); 

按键                                                                          功能

1                                                                      选择TrackBall操作器

2 选择Flight操作器

3 选择Driver操作器

4 选择Terrain操作器

< 在窗口模式下减少分辨率

> 在窗口模式下增大分辨率

Driver:Down 在Driver操作器下,光标向下移代表向下看

Driver:Space 空格代表重置视口,回到原点

Driver:Up 在Driver操作器下,光标向上移代表向上看

Driver:a 用鼠标中键和右键加速

Driver:q 用鼠标Y键控制速度

S 输出状态到控制台

Z 切换播放与否视口录像

b 切换背面锡除与否

e 切换是否限制帧速与否,一般60帧就够了,最少30也差不多

f 在全屏与不全屏之间切换

h 输出帮助信息

l 在打开与关闭灯光之间切换

m 切换线程模式

s 在显示帧速,显示场景时间信息与什么都不显示之间来回切换

t 在有无纹理之间切换

w 在实体模式,多边形模式,点集模式之间来回切换

z 在记录路径与否之间切换
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  osg 名词解释 操作器