Time-step independent exponential smoothing.
When moving at a constant speed: speed * delay = Value - SmoothedFloat.value.
Пример #1
0
        void Start()
        {
            m_trackingText.text = "";
            FindController();
            if (m_controller != null)
            {
                m_leapConnected = m_controller.IsConnected;
            }

            if (m_startInScreenTopViewMode)
            {
                Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false);
                goScreenTop();
            }
            else if (XRSupportUtil.IsXRDevicePresent())
            {
                Screen.SetResolution(640, 480, false);
                goVR();
            }
            else
            {
                Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false);
                goDesktop();
            }

            m_deltaTime       = new SmoothedFloat();
            m_deltaTime.delay = 0.1f;
        }
Пример #2
0
 public Pulsator()
 {
     Enable();
     if (_value == null)
     {
         _value = new SmoothedFloat();
     }
 }
Пример #3
0
    private void Start()
    {
        _smoothedVelocity       = new SmoothedFloat();
        _smoothedVelocity.delay = releaseVelocitySmoothing;
        _smoothedVelocity.reset = true;

        _resetTween          = Tween.Persistent().Target(resetBall).LocalScale(0, resetBall.localScale.x).OverTime(1.0f).Smooth();
        resetBall.localScale = Vector3.zero;
    }
Пример #4
0
 private void Awake()
 {
     if (this._provider == null)
     {
         this._provider = Hands.Provider;
     }
     this._smoothedVelocity       = new SmoothedFloat();
     this._smoothedVelocity.delay = this._rotationSmoothing;
 }
Пример #5
0
        protected virtual void Awake()
        {
            _graphs = new Dictionary <string, Graph>();

            _smoothedMax       = new SmoothedFloat();
            _smoothedMax.delay = _maxSmoothingDelay;

            _smoothedValue       = new SmoothedFloat();
            _smoothedValue.delay = _valueSmoothingDelay;
        }
Пример #6
0
    private void Awake()
    {
        if (_provider == null)
        {
            _provider = Hands.Provider;
        }

        _smoothedVelocity       = new SmoothedFloat();
        _smoothedVelocity.delay = _rotationSmoothing;
    }
Пример #7
0
    void Awake()
    {
        warpedImages = new List <LeapImageBasedMaterial>();

        history      = new List <TransformData> ();
        imageLatency = new SmoothedFloat()
        {
            delay = latencySmoothing
        };

        frameLatency = new SmoothedFloat()
        {
            delay = latencySmoothing
        };
    }
Пример #8
0
        void Start()
        {
            m_trackingText.text = "";
              FindController();
              if (m_controller != null)
            m_leapConnected = m_controller.IsConnected;

              Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false);
              if (VRDevice.isPresent)
              {
            goVR();
              }
              else
              {
            goDesktop();
              }

              m_deltaTime = new SmoothedFloat();
              m_deltaTime.delay = 0.1f;
        }
Пример #9
0
        void Start()
        {
            m_trackingText.text = "";
            FindController();
            if (m_controller != null)
            {
                m_leapConnected = m_controller.IsConnected;
            }

            Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false);
            if (VRDevice.isPresent)
            {
                goVR();
            }
            else
            {
                goDesktop();
            }

            m_deltaTime       = new SmoothedFloat();
            m_deltaTime.delay = 0.1f;
        }
    void Start()
    {
        if (handController == null ||
        imageRetriever == null ||
        leftCamera == null ||
        rightCamera == null ||
        centerCamera == null) {
          Debug.LogWarning ("HandController, ImageRetriever and Alignment Target references cannot be null -> enabled = false");
          enabled = false;
          return;
        }

        deviceInfo = (overrideDeviceType) ? new LeapDeviceInfo(overrideDeviceTypeWith) : handController.GetDeviceInfo ();
        if (deviceInfo.type == LeapDeviceType.Invalid) {
          Debug.LogWarning ("Invalid Leap Device");
          enabled = false;
          return;
        }

        history = new List<TransformData> ();
        imageLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };
        frameLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };
    }
Пример #11
0
 private void Start()
 {
     _smoothedDistance       = new SmoothedFloat();
     _smoothedDistance.delay = distanceSmoothing;
     _smoothedDistance.reset = true;
 }
Пример #12
0
    void Awake()
    {
        warpedImages = new List<LeapImageBasedMaterial>();

        history = new List<TransformData> ();
        imageLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };

        frameLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };
    }
Пример #13
0
	void Awake()
	{
		_smoothedFloat = new SmoothedFloat( 0f, 2f );
		_smoothedVector3 = new SmoothedVector3( cubeTransform.position, 0.5f );
	}
Пример #14
0
 void Awake()
 {
     _smoothedFloat   = new SmoothedFloat(0f, 2f);
     _smoothedVector3 = new SmoothedVector3(cubeTransform.position, 0.5f);
 }
Пример #15
0
    void Awake()
    {
        history = new List<TransformData> ();
        imageLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };

        frameLatency = new SmoothedFloat () {
          delay = latencySmoothing
        };
    }