Beispiel #1
0
 /// <summary> Attemo to retieve Computer Vision data for this frame; which will contain a smoothed set of HandAngles, wirstPosition and rotation. </summary>
 /// <param name="cvData"></param>
 /// <returns></returns>
 public bool GetCVData(out SGCore.CV.HandDataPoint cvData, bool forceUpdate = false)
 {
     cvData = null;
     if (CVDataAvailable(forceUpdate))
     {
         cvData = this.lastCVData;
     }
     return(cvData != null);
 }
Beispiel #2
0
 /// <summary> Calculate CV hand pose and position if we haven't already this frame. </summary>
 /// <param name="forceUpdate"></param>
 /// <returns></returns>
 protected void UpdateCVData(bool forceUpdate = false)
 {
     if (forceUpdate || newCVNeeded)                                                                  //we need a new pose
     {
         newCVNeeded = false;                                                                         //we'll only check once per frame.
         SGCore.CV.HandDataPoint cvData;
         if (SGCore.CV.CV_HandLayer.TryGetPose(this.IsRight, SGCore.DeviceType.NOVA, "", out cvData)) //NOVA FOR NOW BUT THIS MUST BE THE ACTUAL DEVICE!
         {
             lastCVData = cvData;
         }
         else
         {
             lastCVData = null; //so that the GetData knows it's not (or no longer) available.
         }
     }
 }