예제 #1
0
    private float GetValue(MotionSource s)
    {
        switch (s)
        {
        case MotionSource.Cosine:
            return(cosine);

        case MotionSource.Sine:
            return(sine);

        case MotionSource.Tangent:
            return(tangent);

        case MotionSource.None:
        default:
            return(0.0f);
        }
    }
예제 #2
0
        public void Dispose()
        {
            if (Sensor == null)
            {
                return;
            }

            WSRConfig.GetInstance().logInfo("TASKS", "Stop Tasks");
            if (MotionSource != null)
            {
                MotionSource.Cancel();
            }
            if (QRCodeSource != null)
            {
                QRCodeSource.Cancel();
            }
            if (GestureSource != null)
            {
                GestureSource.Cancel();
            }
            if (ColorSource != null)
            {
                ColorSource.Cancel();
            }
            if (FaceSource != null)
            {
                FaceSource.Cancel();
            }

            if (Sensor == null)
            {
                return;
            }
            WSRConfig.GetInstance().logInfo("KINECT", "Stop Sensor");
            try {
                Sensor.AudioSource.Stop();
                Sensor.Stop();
            } catch (Exception) {}
        }