zoukankan      html  css  js  c++  java
  • 响应事件处理

    bool VCArmEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&aa)
    {
        bool handled = false;
        
        
        switch (ea.getEventType())
            {
            case osgGA::GUIEventAdapter::FRAME:
            {
                break;
            }
            case osgGA::GUIEventAdapter::MOVE:
            {
                //handled = handleMouseMoved( ea, aa );
                break;
            }
            case  osgGA::GUIEventAdapter::KEYDOWN:
            {
                const int key = ea.getKey();
                if (ea.getKey() == 0xFF51)
                {//水平正向旋转
                    emit signalVCArmForwardDirectionRotationH_1();
                }
                else if (ea.getKey() == 0xFF53)
                {
                    //水平逆向旋转
                    emit signalVCArmReverseDirectionRotationH_1();
                }
                else if (ea.getKey() == 0xFF52)
                {
                    //竖直正向旋转
                    emit signalVCArmForwardDirectionRotationV_1();
                }
                else if (ea.getKey() == 0xFF54)
                {
                    //竖直逆向旋转
                    emit signalVCArmReverseDirectionRotationV_1();
                }
                
                break;
            }
            default:
                break;
            }
        return handled;
    }

  • 相关阅读:
    Codeforces #364 DIV2
    uva10635 LIS
    hdu3714 三分找最值
    【转】三分查找
    NBUT 1457 莫队算法 离散化
    HYSBZ 2038 莫队算法
    莫队算法
    poj3417 LCA + 树形dp
    hdu3087 LCA + 暴力
    hdu2874 LCA在线算法
  • 原文地址:https://www.cnblogs.com/herd/p/11319632.html
Copyright © 2011-2022 走看看