Ejemplo n.º 1
0
        protected override void StartHaptics(HumanBodyBones bodyPart, BodyCoordinateHit hitLocation, float intensity)
        {
#if VRTK_DEFINE_SDK_MANUS_VR
            Manus.ManusSetVibration(handData.Session,
                                    isRightGlove ? device_type_t.GLOVE_RIGHT : device_type_t.GLOVE_LEFT,
                                    intensity,
                                    (ushort)hapticDuration);
#endif
        }
Ejemplo n.º 2
0
        protected override void CancelHaptics()
        {
#if VRTK_DEFINE_SDK_MANUS_VR
            Manus.ManusSetVibration(handData.Session,
                                    isRightGlove ? device_type_t.GLOVE_RIGHT : device_type_t.GLOVE_LEFT,
                                    0,
                                    (ushort)hapticDuration);
#endif
        }
Ejemplo n.º 3
0
    /// <summary>
    /// Makes the motor in the Manus Glove vibrate for a certain duration
    /// </summary>
    /// <param name="aPower">The power of the motor from 0 to 1</param>
    /// <param name="aDuration">The duration in seconds</param>
    public int SetVibrationPeriod(float aPower, float aDuration)
    {
        if (timer == null || timer.Enabled)
        {
            return(Manus.ERROR);
        }

        timer.Interval = aDuration * 1000.0;
        timer.Start();
        return(Manus.ManusSetVibration(hand, aPower));
    }
Ejemplo n.º 4
0
 public void VibrateSoftRight()
 {
     Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_RIGHT, 0.8f, 150);
 }
Ejemplo n.º 5
0
 public void VibrateVerySoftLeft()
 {
     Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_LEFT, 0.6f, 300);
 }
Ejemplo n.º 6
0
 public void VibrateVerySoftRight()
 {
     Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_RIGHT, 0.5f, 300);
 }
Ejemplo n.º 7
0
 public void VibrateSoftLeft()
 {
     Manus.ManusSetVibration(handData.Session, device_type_t.GLOVE_LEFT, 0.9f, 150);
 }
 /// <summary>
 /// Vibrate the glove
 /// </summary>
 private void VibrateHand()
 {
     Manus.ManusSetVibration(HandData.Session, DeviceType, 0.7f, 150);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Makes the motor in the Manus Glove vibrate at a constant power.
 /// If the motor is currently set with SetVibrationPeriod, that timer is stopped.
 /// Turn the motor off by setting the power to 0.
 /// </summary>
 /// <param name="aPower">The power of the motor from 0 to 1</param>
 public int SetConstantVibration(float aPower)
 {
     return(Manus.ManusSetVibration(hand, aPower));
 }
Ejemplo n.º 10
0
 private void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     Manus.ManusSetVibration(hand, 0.0f);
 }
Ejemplo n.º 11
0
 //vibrate right hand
 private void VibrateHandRight()
 {
     Manus.ManusSetVibration(HandData.Instance.Session, DeviceTypeRight, 0.7f, 150);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Vibrate the glove
 /// </summary>
 private void VibrateHand(device_type_t device)
 {
     Manus.ManusSetVibration(HandData.Instance.Session, device, 0.7f, 150);
 }