Пример #1
0
        //-----------------------------------------------------------------------------
        // message aggregation
        //-----------------------------------------------------------------------------

        public List <ViveShareMessage> GenerateMessagesList()
        {
            List <ViveShareMessage> list = new List <ViveShareMessage>();

            // dump message from queue
            while (messageQueue.Count > 0)
            {
                ViveShareMessage msg = messageQueue.Dequeue();
                list.Add(msg);
            }

            // append sync param information to list
            for (int i = 0; i < syncIdList.Count; i++)
            {
                if (syncIdList[i].hasAuthority == false)
                {
                    continue;
                }

                ViveShareMessage   msg;
                ViveShare_SyncBase syncObj = GetSyncObjFromSyncId(syncIdList[i]);
                if (syncObj != null && syncObj.GenerateMessage(out msg))
                {
                    list.Add(msg);
                }
            }

            return(list);
        }
Пример #2
0
        public void DeliverSyncParamMessage(string id, float timeStamp, object[] paramList)
        {
            ViveShare_SyncIdentity syncId;

            if (syncIdDictionary.TryGetValue(id, out syncId) == false || syncId.hasAuthority == true)
            {
                return;
            }

            ViveShare_SyncBase syncObj = GetSyncObjFromSyncId(syncId);

            if (syncObj != null)
            {
                syncObj.SetParams(timeStamp, paramList);
            }
        }