Ejemplo n.º 1
0
        public void RegisterPointer(XRUIPointer pointer)
        {
            EnsureInitialized();

            for (int i = 0; i < m_RegisteredPointers.Count; i++)
            {
                if (m_RegisteredPointers[i].pointer == pointer)
                {
                    return;
                }
            }

            m_RegisteredPointers.Add(new RegisteredPointer(pointer, m_RollingPointerIndex++));
        }
Ejemplo n.º 2
0
        public void UnregisterPointer(XRUIPointer pointer)
        {
            EnsureInitialized();

            for (int i = 0; i < m_RegisteredPointers.Count; i++)
            {
                if (m_RegisteredPointers[i].pointer == pointer)
                {
                    RegisteredPointer registeredPointer = m_RegisteredPointers[i];
                    registeredPointer.pointer = null;
                    m_RegisteredPointers[i]   = registeredPointer;
                    return;
                }
            }
        }
Ejemplo n.º 3
0
        public bool GetTrackedDeviceModel(XRUIPointer pointer, out TrackedDeviceModel model)
        {
            EnsureInitialized();

            for (int i = 0; i < m_RegisteredPointers.Count; i++)
            {
                if (m_RegisteredPointers[i].pointer == pointer)
                {
                    model = m_RegisteredPointers[i].model;
                    return(true);
                }
            }

            model = new TrackedDeviceModel(-1);
            return(false);
        }
Ejemplo n.º 4
0
 public RegisteredPointer(XRUIPointer pointer, int deviceIndex)
 {
     this.pointer = pointer;
     model        = new TrackedDeviceModel(deviceIndex);
 }