Example #1
0
 /// <summary>
 ///   Called when a head movement is detected.
 /// </summary>
 ///
 protected virtual void OnHeadMove(HeadEventArgs args)
 {
     if (HeadMove != null)
     {
         if (SynchronizingObject != null &&
             SynchronizingObject.InvokeRequired)
         {
             SynchronizingObject.BeginInvoke(
                 HeadMove, new object[] { this, args });
         }
         else
         {
             HeadMove(this, args);
         }
     }
 }
Example #2
0
        /// <summary>
        ///   Called when a face enters the scene.
        /// </summary>
        ///
        protected virtual void OnHeadEnter(HeadEventArgs args)
        {
            IsTracking  = true;
            IsDetecting = false;

            if (HeadEnter != null)
            {
                if (SynchronizingObject != null &&
                    SynchronizingObject.InvokeRequired)
                {
                    SynchronizingObject.BeginInvoke(
                        HeadEnter, new object[] { this, args });
                }
                else
                {
                    HeadEnter(this, args);
                }
            }
        }