void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData eventData)
 {
     ResetDwellFeedback();
 }
Beispiel #2
0
 /// <summary>
 /// No-op on pointer down.
 /// </summary>
 /// <param name="eventData"></param>
 public void OnPointerDown(MixedRealityPointerEventData eventData)
 {
 }
 void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData eventData)
 {
 }
Beispiel #4
0
 public void OnPointerUp(MixedRealityPointerEventData eventData)
 {
     Debug.Log("OnPointerUp");
 }
Beispiel #5
0
 public void OnPointerClicked(MixedRealityPointerEventData eventData)
 {
     onClick.Invoke();
 }
Beispiel #6
0
 // Update is called once per frame
 public void OnClick(MixedRealityPointerEventData mixedRealityPointerEventData)
 {
     tmp.text = "Changed noq.l.....";
     Debug.Log("On click text " + tmp.text);
 }
Beispiel #7
0
 public void Spawn(MixedRealityPointerEventData eventData)
 {
     gpc.AddPose(eventData.Pointer.Result.Details.Point);
 }
 /// <inheritdoc/>
 void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData)
 {
     this.OnPointerUp?.Invoke(this, eventData);
 }
Beispiel #9
0
 public void OnPointerDown(MixedRealityPointerEventData eventData)
 {
     _timesClicked++;
     UpdateText();
     PlayClip(_clickAudio);
 }
Beispiel #10
0
    public void OnPointerDragged(MixedRealityPointerEventData eventData)
    {
        var dv = eventData.Pointer.Position - pointerStartPosition;

        Resize(dv);
    }
Beispiel #11
0
 public void OnPointerDown(MixedRealityPointerEventData eventData)
 {
     startParentScale     = ParentTransform.localScale;
     pointerStartPosition = eventData.Pointer.Position;
     startParentPosition  = ParentTransform.position;
 }
Beispiel #12
0
        public void Test()
        {
            TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true);

            var selector = new DefaultPrimaryPointerSelector();

            selector.Initialize();

            // No primary pointer
            Assert.IsNull(selector.Update());

            var pointer1 = new TestPointer();

            Assert.IsFalse(pointer1.IsInteractionEnabled);

            selector.RegisterPointer(pointer1);

            // Still no primary pointer because pointer 1 is not interaction enabled
            Assert.IsNull(selector.Update());

            pointer1.IsInteractionEnabled = true;

            // Pointer 1 selected as primary
            Assert.AreSame(pointer1, selector.Update());

            pointer1.IsInteractionEnabled = false;

            // No primary pointer
            Assert.IsNull(selector.Update());

            pointer1.IsInteractionEnabled = true;

            // Pointer 1 selected as primary
            Assert.AreSame(pointer1, selector.Update());

            var pointer2 = new TestPointer();

            pointer2.IsInteractionEnabled = true;
            selector.RegisterPointer(pointer2);

            // Pointer 2 selected as primary because it got enabled last
            Assert.AreSame(pointer2, selector.Update());

            var pointerHandler = selector as IMixedRealityPointerHandler;
            var eventData      = new MixedRealityPointerEventData(null);

            // Pointer 1 down
            eventData.Initialize(pointer1, MixedRealityInputAction.None);
            pointerHandler.OnPointerDown(eventData);

            // Pointer 1 selected as primary because it is pressed
            Assert.AreSame(pointer1, selector.Update());

            // Pointer 2 down
            eventData.Initialize(pointer2, MixedRealityInputAction.None);
            pointerHandler.OnPointerDown(eventData);

            // Pointer 1 still primary because it has been pressed longer
            Assert.AreSame(pointer1, selector.Update());

            // Pointer 1 up
            eventData.Initialize(pointer1, MixedRealityInputAction.None);
            pointerHandler.OnPointerUp(eventData);

            // Pointer 2 primary because it is the only one pressed
            Assert.AreSame(pointer2, selector.Update());

            // Pointer 2 up
            eventData.Initialize(pointer2, MixedRealityInputAction.None);
            pointerHandler.OnPointerUp(eventData);

            // Pointer 2 still primary because it is the one released last
            Assert.AreSame(pointer2, selector.Update());

            selector.UnregisterPointer(pointer2);

            // Pointer 1 primary because it is the only one left and is interaction enabled
            Assert.AreSame(pointer1, selector.Update());

            selector.UnregisterPointer(pointer1);

            // No primary pointer
            Assert.IsNull(selector.Update());

            selector.Destroy();
        }
Beispiel #13
0
 public void OnPointerUp(MixedRealityPointerEventData eventData)
 {
     pressableTransform.localPosition = Vector3.zero;
 }
Beispiel #14
0
 public void OnPointerDown(MixedRealityPointerEventData eventData)
 {
     pressableTransform.localPosition = pressedOffset;
 }
Beispiel #15
0
 public void OnPointerUp(MixedRealityPointerEventData eventData)
 {
     _panningPointer = null;
 }
Beispiel #16
0
 public void OnPointerClicked(MixedRealityPointerEventData eventData)
 {
     debugEnabled = !debugEnabled;
     UpdateChildren();
 }
 public void OnPointerDragged(MixedRealityPointerEventData eventData)
 {
 }
Beispiel #18
0
 void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData eventData)
 {
 }
Beispiel #19
0
 public void OnPointerClicked(MixedRealityPointerEventData eventData)
 {
 }
Beispiel #20
0
 public void OnPointerUp(MixedRealityPointerEventData eventData)
 {
     throw new System.NotImplementedException();
 }
Beispiel #21
0
 public void OnPointerDragged(MixedRealityPointerEventData eventData)
 {
     //Debug.Log("OnPointerDragged");
 }
 void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData)
 {
 }
Beispiel #23
0
 public void OnPointerClicked(MixedRealityPointerEventData eventData)
 {
     Debug.Log("OnPointerClicked");
 }
Beispiel #24
0
 public void OnPointerDown(MixedRealityPointerEventData eventData)
 {
     Debug.Log("Toggle sharing");
 }