示例#1
0
    // Use this for initialization    
    public override void utInit(Ubitrack.SimpleFacade simpleFacade)
    {
        base.utInit(simpleFacade);

        switch (ubitrackEvent)
        {
            case UbitrackEventType.Pull:
                {
                    m_position3DListPull = simpleFacade.getPullSinkPosition3DList(patternID);
                    m_simplePosition3DList = new SimplePositionList3D();
                    if (m_position3DListPull == null)
                    {
                        throw new Exception("SimpleApplicationPositionList3DReceiver not found for patternID:" + patternID);
                    }
                    break;
                }
            case UbitrackEventType.Push:
                {
                    m_listReceiver = new Unity3DListReceiver();

                    if (!simpleFacade.set3DPositionListCallback(patternID, m_listReceiver))
                    {
                        throw new Exception("Simple3DListReceiver could not be set for patternID:" + patternID);
                    }

                    break;
                }
            default:
                break;
        }
    }
示例#2
0
        // Use this for initialization
        public override void utInit(SimpleFacade simpleFacade)
        {
            base.utInit(simpleFacade);

            switch (ubitrackEvent)
            {
            case UbitrackEventType.Pull:
            {
                m_position3DListPull   = simpleFacade.getPullSinkPosition3DList(patternID);
                m_simplePosition3DList = new SimplePositionList3D();
                if (m_position3DListPull == null)
                {
                    throw new Exception("SimpleApplicationPositionList3DReceiver not found for patternID:" + patternID);
                }
                break;
            }

            case UbitrackEventType.Push:
            {
                m_listReceiver = new Unity3DListReceiver();

                if (!simpleFacade.set3DPositionListCallback(patternID, m_listReceiver))
                {
                    throw new Exception("Simple3DListReceiver could not be set for patternID:" + patternID);
                }

                break;
            }

            default:
                break;
            }
        }