osg视图操作关于Manipulator

本文主要介绍了osg视图操作中的KeySwitchMatrixManipulator类,用于通过按键切换不同操作器,如TrackBall和Driver。同时提到了如何设置相机操作器,并讨论了自定义操作器的场景。在CompositeViewer的多视图环境中,获取并切换活动视图的操作也进行了说明,特别指出了一处需要注意的交互问题。最后提到了视图的六方向旋转操作。
摘要由CSDN通过智能技术生成

想看干货,还是FreeSouth总结的东西,写的很全
http://www.d3dweb.com/Documents/201203/31-22251384929.html

以下是我自己项目的记录及碎碎念,为了梳理和加深印象:
1.KeySwitchMatrixManipulator类可以看做一个各类操作器的管理类,用按键来切换这些操作器。比如‘1’会被切换到TrackBall‘2’会被切换到Driver。
比如这样:

    // Add our trackball manipulator to the switcher
    m_keyswitchManipulator->addMatrixManipulator( '1', "Trackball", m_traceball.get());

    // Init the switcher to the first manipulator (in this case the only manipulator)
    m_keyswitchManipulator->selectMatrixManipulator(
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值