Пример #1
0
 public void EnableInputSender(AirVRInputSender sender)
 {
     if (senders.ContainsKey(sender.name) == false)
     {
         senders.Add(sender.name, sender);
         if (initialized)
         {
             sender.OnRegistered(onairvr_RegisterInputSender(sender.name));
         }
     }
 }
Пример #2
0
 public void DisableInputSender(AirVRInputSender sender)
 {
     if (senders.ContainsKey(sender.name))
     {
         if (sender.isRegistered)
         {
             onairvr_UnregisterInputSender((byte)sender.deviceID);
             sender.OnUnregistered();
         }
         senders.Remove(sender.name);
     }
 }
Пример #3
0
 public void PendState(AirVRInputSender sender, byte control, byte state)
 {
     PendStateImpl(sender.id, control, state);
 }
Пример #4
0
 public void UnregisterInputSender(AirVRInputSender sender)
 {
     senders.Remove(sender.id);
 }
Пример #5
0
 public void RegisterInputSender(AirVRInputSender sender)
 {
     senders[sender.id] = sender;
 }
Пример #6
0
 public void PendRaycastHit(AirVRInputSender sender, byte control, Vector3 origin, Vector3 hitPosition, Vector3 hitNormal)
 {
     PendRaycastHitImpl(sender.id, control, origin, hitPosition, hitNormal);
 }
Пример #7
0
 public void PendPose(AirVRInputSender sender, byte control, Vector3 position, Quaternion rotation)
 {
     PendPoseImpl(sender.id, control, position, rotation);
 }
Пример #8
0
    public void PendQuaternion(AirVRInputSender sender, byte controlID, Quaternion value)
    {
        Assert.IsTrue(sender.isRegistered);

        PendInputFloat4Impl((byte)sender.deviceID, controlID, new Vector4(value.x, value.y, value.z, value.w), (byte)SendingPolicy.Always);
    }
Пример #9
0
 public void PendAxis(AirVRInputSender sender, byte control, float axis)
 {
     PendAxisImpl(sender.id, control, axis);
 }
Пример #10
0
    public void PendTrackedDeviceFeedback(AirVRInputSender sender, byte controlID, Vector3 rayOrigin, Vector3 hitPosition, Vector3 hitNormal)
    {
        Assert.IsTrue(sender.isRegistered);

        PendTrackedDeviceFeedbackImpl((byte)sender.deviceID, controlID, rayOrigin, hitPosition, hitNormal, (byte)SendingPolicy.NonzeroAlwaysZeroOnce);
    }
Пример #11
0
    public void PendTransform(AirVRInputSender sender, byte controlID, Vector3 position, Quaternion orientation)
    {
        Assert.IsTrue(sender.isRegistered);

        PendInputTransformImpl((byte)sender.deviceID, controlID, position, orientation, (byte)SendingPolicy.Always);
    }
Пример #12
0
 public void PendButton(AirVRInputSender sender, byte controlID, bool value)
 {
     PendAxis(sender, controlID, value ? 1.0f : 0.0f);
 }
Пример #13
0
 public void PendButton(AirVRInputSender sender, byte controlID, float value)
 {
     PendAxis(sender, controlID, value);
 }
Пример #14
0
    public void PendAxis(AirVRInputSender sender, byte controlID, float value)
    {
        Assert.IsTrue(sender.isRegistered);

        PendInputFloatImpl((byte)sender.deviceID, controlID, value, (byte)SendingPolicy.NonzeroAlwaysZeroOnce);
    }
Пример #15
0
    public void PendVector2D(AirVRInputSender sender, byte controlID, Vector2 value)
    {
        Assert.IsTrue(sender.isRegistered);

        PendInputFloat2Impl((byte)sender.deviceID, controlID, value, (byte)SendingPolicy.Always);
    }
Пример #16
0
 public bool CheckIfInputSenderAvailable(AirVRInputSender sender)
 {
     return(senders.ContainsValue(sender) && sender.isRegistered);
 }
Пример #17
0
 public void PendAxis2D(AirVRInputSender sender, byte control, Vector2 axis2D)
 {
     PendAxis2DImpl(sender.id, control, axis2D);
 }
Пример #18
0
    public void PendTouch(AirVRInputSender sender, byte controlID, Vector2 position, bool touch)
    {
        Assert.IsTrue(sender.isRegistered);

        PendInputTouchImpl((byte)sender.deviceID, controlID, position, touch ? 1.0f : 0.0f, (byte)SendingPolicy.NonzeroAlwaysZeroOnce);
    }