1"use strict";(self.webpackChunkconjurekit_docs=self.webpackChunkconjurekit_docs||[]).push([[392],{68085:(t,a,e)=>{e.r(a),e.d(a,{assets:()=>u,contentTitle:()=>i,default:()=>d,frontMatter:()=>l,metadata:()=>s,toc:()=>o});var n=e(87462),r=(e(67294),e(3905));e(61839);const l={title:"Auki::Ur::HandTracker",summary:"Ur's HandTracker provides real-time tracking of 3D hand poses from monocular RGB video in mobile phones."},i="Auki::Ur::HandTracker",s={unversionedId:"com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker",id:"com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker",title:"Auki::Ur::HandTracker",description:"Ur's HandTracker provides real-time tracking of 3D hand poses from monocular RGB video in mobile phones.",source:"@site/docs/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker.md",sourceDirName:"com.aukilabs.unity.ur/0.6.7/Classes",slug:"/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker",permalink:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker",draft:!1,tags:[],version:"current",frontMatter:{title:"Auki::Ur::HandTracker",summary:"Ur's HandTracker provides real-time tracking of 3D hand poses from monocular RGB video in mobile phones."},sidebar:"tutorialSidebar",previous:{title:"Classes",permalink:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/"},next:{title:"Auki::Ur::HandTrackerConfigurator",permalink:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker_configurator"}},u={},o=[{value:"Public Classes",id:"public-classes",level:2},{value:"Public Types",id:"public-types",level:2},{value:"Public Functions",id:"public-functions",level:2},{value:"Public Attributes",id:"public-attributes",level:2},{value:"Public Types Documentation",id:"public-types-documentation",level:2},{value:"enum CalibrationStatus",id:"enum-calibrationstatus",level:3},{value:"enum CalibrationStatusReport",id:"enum-calibrationstatusreport",level:3},{value:"Public Functions Documentation",id:"public-functions-documentation",level:2},{value:"function GetInstance",id:"function-getinstance",level:3},{value:"function SetARSystem",id:"function-setarsystem",level:3},{value:"function SetMaterialOverride",id:"function-setmaterialoverride",level:3},{value:"function StartCalibration",id:"function-startcalibration",level:3},{value:"function GetCalibrationStatus",id:"function-getcalibrationstatus",level:3},{value:"function GetCalibrationState",id:"function-getcalibrationstate",level:3},{value:"function SetCalibrateState",id:"function-setcalibratestate",level:3},{value:"function Start",id:"function-start",level:3},{value:"function Stop",id:"function-stop",level:3},{value:"function ShowHandMesh",id:"function-showhandmesh",level:3},{value:"function HideHandMesh",id:"function-hidehandmesh",level:3},{value:"function Update",id:"function-update",level:3},{value:"function Get3DLandmarks",id:"function-get3dlandmarks",level:3},{value:"function GetTranslations",id:"function-gettranslations",level:3},{value:"Public Attributes Documentation",id:"public-attributes-documentation",level:2},{value:"variable LandmarksCount",id:"variable-landmarkscount",level:3},{value:"variable TranslationsCount",id:"variable-translationscount",level:3},{value:"variable OnUpdate",id:"variable-onupdate",level:3}],k={toc:o};function d(t){let{components:a,...e}=t;return(0,r.kt)("wrapper",(0,n.Z)({},k,e,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"aukiurhandtracker"},"Auki::Ur::HandTracker"),(0,r.kt)("p",null,"Ur's HandTracker provides real-time tracking of 3D hand poses from monocular RGB video in mobile phones. "),(0,r.kt)("h2",{id:"public-classes"},"Public Classes"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null}),(0,r.kt)("th",{parentName:"tr",align:null},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"struct"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/struct_auki_1_1_ur_1_1_hand_tracker_1_1_calibration_report"},"CalibrationReport"))," ",(0,r.kt)("br",null),"Data structure used to report information about the current calibration process in the ",(0,r.kt)("inlineCode",{parentName:"td"},"StartCalibration")," callback.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"struct"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/struct_auki_1_1_ur_1_1_hand_tracker_1_1_calibration_state"}
1,"CalibrationState"))," ",(0,r.kt)("br",null),"Describes a CalibrationState.")))),(0,r.kt)("h2",{id:"public-types"},"Public Types"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null}),(0,r.kt)("th",{parentName:"tr",align:null},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"enum class"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#enum-calibrationstatus"},"CalibrationStatus"))," { NOT_CALIBRATED, CALIBRATING, CALIBRATED, MANUAL_CALIBRATION}",(0,r.kt)("br",null),"Enum with the possible HandTracker calibration state values.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"enum class"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#enum-calibrationstatusreport"},"CalibrationStatusReport"))," { FAILURE_NO_PLANE, FAILURE_NO_HAND, FAILURE_NO_MEASUREMENTS, CALIBRATION_AR_NOT_READY, CALIBRATION_PROGRESS, CALIBRATION_FINISHED}",(0,r.kt)("br",null),"Enum used to report calibration state during calibration.")))),(0,r.kt)("h2",{id:"public-functions"},"Public Functions"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null}),(0,r.kt)("th",{parentName:"tr",align:null},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker"},"HandTracker")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-getinstance"},"GetInstance")),"()",(0,r.kt)("br",null),"Returns the instance of the HandTracker (singleton).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-setarsystem"},"SetARSystem")),"(ARSession arSession, Camera arCamera, ARRaycastManager arRaycastManager)",(0,r.kt)("br",null),"Pass along the AR state the client app is using. It is required to call this method with valid parameters before starting HandTracker.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-setmaterialoverride"},"SetMaterialOverride")),"(Material material)",(0,r.kt)("br",null),"Method to override the hand tracker debugger default material. This has to be called before calling HandTracker.Start()")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-startcalibration"},"StartCalibration")),"(Action< ",(0,r.kt)("a",{parentName:"td",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/struct_auki_1_1_ur_1_1_hand_tracker_1_1_calibration_report"},"CalibrationReport")," > progressReport, bool showUI =false)",(0,r.kt)("br",null),"Starts the HandTracker's calibration process. A delegate can be used to get progress report from the calibration process.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#enum-calibrationstatus"},"CalibrationStatus")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-getcalibrationstatus"},"GetCalibrationStatus")),"()",(0,r.kt)("br",null),"Query the calibration status of HandTracker.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/struct_auki_1_1_ur_1_1_hand_tracker_1_1_calibration_state"},"CalibrationState")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-getcalibrationstate"},"GetCalibrationState")),"()",(0,r.kt)("br",null),"Returns the HandTracker's current CalibrationState. Make sure the calibration status is CALIBRATED before relying on this state.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-setcalibratestate"},"SetCalibrateState")),"(",(0,r.kt)("a",{parentName:"td",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/struct_auki_1_1_ur_1_1_hand_tracker_1_1_calibration_state"},"CalibrationState")," calibrationState)",(0,r.kt)("br",null),"Sets the HansTracker's current CalibrationState. After this call, the calibration status will be set to MANUAL_CALIBRATION to reflect the fact that the calibration state was restored from a previous session.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"bool"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-start"},"Start")),"(int numHands =1, long updateIntervalInMilliseconds =0)",(0,r.kt)("br",null),"Begins tracking hand(s).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-stop"},"Stop")),"()",(0,r.kt)("br",null),"Stops tracking hand(s).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-showh
1andmesh"},"ShowHandMesh")),"()",(0,r.kt)("br",null),"Displays debug GameObjects on tracked hand landmarks.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-hidehandmesh"},"HideHandMesh")),"()",(0,r.kt)("br",null),"Hides debug GameObjects on tracked hand landmarks.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"void"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-update"},"Update")),"()",(0,r.kt)("br",null),"Processes camera frames to track hands. Needs to be invoked in the game loop.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"float[]"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-get3dlandmarks"},"Get3DLandmarks")),"()",(0,r.kt)("br",null),"Gets a list of hand landmarks.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"float[]"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#function-gettranslations"},"GetTranslations")),"()",(0,r.kt)("br",null),"Gets the global translation of the hand(s).")))),(0,r.kt)("h2",{id:"public-attributes"},"Public Attributes"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null}),(0,r.kt)("th",{parentName:"tr",align:null},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"const int"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#variable-landmarkscount"},"LandmarksCount"))," ",(0,r.kt)("br",null),"Number of landmarks per hand.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"const int"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#variable-translationscount"},"TranslationsCount"))," ",(0,r.kt)("br",null),"Number of translations.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Action< float[], float[], int[], float[]>"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},(0,r.kt)("a",{parentName:"strong",href:"/unity/com.aukilabs.unity.ur/0.6.7/Classes/class_auki_1_1_ur_1_1_hand_tracker#variable-onupdate"},"OnUpdate"))," ",(0,r.kt)("br",null),"Callback returning estimated landmarks, their translations, right-handedness and confidence scores.")))),(0,r.kt)("h2",{id:"public-types-documentation"},"Public Types Documentation"),(0,r.kt)("h3",{id:"enum-calibrationstatus"},"enum CalibrationStatus"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Enumerator"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"NOT_CALIBRATED"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"tracker is not yet calibrated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CALIBRATING"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"tracker is ongoing calibration")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CALIBRATED"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"tracker is calibrated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"MANUAL_CALIBRATION"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"manual calibration")))),(0,r.kt)("p",null,"Enum with the possible HandTracker calibration state values. "),(0,r.kt)("h3",{id:"enum-calibrationstatusreport"},"enum CalibrationStatusReport"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Enumerator"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FAILURE_NO_PLANE"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported when no plane trackable can be found")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FAILURE_NO_HAND"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported when hand is not detected")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FAILURE_NO_MEASUREMENTS"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported when no measurements (or not enough measurements) where taken. This could be due to user moving the device too fast, making it impossible to take reliable measurements.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CALIBRATION_AR_NOT_READY"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported while awaiting for the user to move the mobile device to gather more information about the environment")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CALIBRATION_PROGRESS"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported during the calibration process whenever enough measurements have been taken")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CALIBRATION_FINISHED"),(0,r.kt)("td",{parentName:"tr",align:null}),(0,r.kt)("td",{parentName:"tr",align:null},"reported when there are sample measurements for all depth intervals and a calibration")))),(0,r.kt)("p",null,"Enum used to report calibration state during calibration. "),(0,r.kt)("p",null,"FAILURE_NO_PLANE is reported when no plane trackable can be found. FAILURE_NO_HAND is reported when hand is not detected. FAILURE_NO_MEASUREMENTS is reported when no measurements (or not enough measurements) where taken. This could be due to user moving the device too fast, making it impossible to take reliable measurements. CALIBRATION_AR_NOT_READY is reported while awaiting for the user to move the mobile device to gather more information about the environment CALIBRATION_PROGRESS is reported during the calibration process whenever enough measurements have been taken from one of the required depth interval. CALIBRATION_FINISHED is reported when there are sample measurements for all depth intervals and a calibration value was found. "),(0,r.kt)("h2",{id:"public-functions-documentation"},"Public Functions Documentation"),(0,r.kt)("h3",{id:"function-getinstance"},"function GetInstance"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"static HandTracker GetInstance()\n")),(0,r.kt)("p",null,"Returns the instance of the HandTracker (singleton). "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": HandTracker object"),(0,r.kt)("h3",{id:"function-setarsystem"},"function SetARSystem"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void SetARSystem(\n ARSession arSession,\n Camera arCamera,\n ARRaycastManager arRaycastManager\n)\n")),(0,r.kt)("p",null,"Pass along the AR state the client app is using. It is required to call this method with valid parameters before starting HandTracker. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Parameters"),": "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"arSession")," The ARSession in use by the client app."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"arCamera")," The Camera attached to the ARSession"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"arRaycastManager")," The ARRaycastManager in use by the client app.")),(0,r.kt)("h3",{id:"function-setmaterialoverride"},"function SetMaterialOverride"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void SetMaterialOverride(\n Material material\n)\n")),(0,r.kt)("p",null,"Method to override the hand tracker debugger default material. This has to be called before calling HandTracker.Start() "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Parameters"),": "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"material")," ")),(0,r.kt)("h3",{id:"function-startcalibration"},"function StartCalibration"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void StartCalibration(\n Action< CalibrationReport > progressReport,\n bool showUI =false\n)\n")),(0,r.kt)("p",null,"Starts the HandTracker's calibration process. A delegate can be used to get progress report from the calibration process. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Parameters"),": "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"progressReport")," Delegate to be called with calibration progress report."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"showUI")," If true, a debug internal UI will be displayed to drive the calibration process. Default is false.")),(0,r.kt)("h3",{id:"function-getcalibrationstatus"},"function GetCalibrationStatus"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"CalibrationStatus GetCalibrationStatus()\n")),(0,r.kt)("p",null,"Query the calibration status of HandTracker. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": A CalibrationStatus"),(0,r.kt)("h3",{id:"function-getcalibrationstate"},"function GetCalibrationState"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"CalibrationState GetCalibrationState()\n")),(0,r.kt)("p",null,"Returns the HandTracker's current CalibrationState. Make sure the calibration status is CALIBRATED before relying on this state. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": A CalibrationState"),(0,r.kt)("h3",{id:"function-setcalibratestate"},"function SetCalibrateState"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void SetCalibrateState(\n CalibrationState calibrationState\n)\n")),(0,r.kt)("p",null,"Sets the HansTracker's current CalibrationState. After this call, the calibration status will be set to MANUAL_CALIBRATION to reflect the fact that the calibration state was restored from a previous session. "),(0,r.kt)("h3",{id:"function-start"},"function Start"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"bool Start(\n int numHands =1,\n long updateIntervalInMilliseconds =0\n)\n")),(0,r.kt)("p",null,"Begins tracking hand(s). "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Parameters"),": "),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"numHands")," Number hands to track"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"updateIntervalInMilliseconds")," Tracking update interval")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if tracking starts successfully, ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," if it doesn't"),(0,r.kt)("h3",{id:"function-stop"},"function Stop"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void Stop()\n")),(0,r.kt)("p",null,"Stops tracking hand(s). "),(0,r.kt)("h3",{id:"function-showh
1andmesh"},"function ShowHandMesh"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void ShowHandMesh()\n")),(0,r.kt)("p",null,"Displays debug GameObjects on tracked hand landmarks. "),(0,r.kt)("h3",{id:"function-hidehandmesh"},"function HideHandMesh"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void HideHandMesh()\n")),(0,r.kt)("p",null,"Hides debug GameObjects on tracked hand landmarks. "),(0,r.kt)("h3",{id:"function-update"},"function Update"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"void Update()\n")),(0,r.kt)("p",null,"Processes camera frames to track hands. Needs to be invoked in the game loop. "),(0,r.kt)("h3",{id:"function-get3dlandmarks"},"function Get3DLandmarks"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"float[] Get3DLandmarks()\n")),(0,r.kt)("p",null,"Gets a list of hand landmarks. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": An array of floats with each 3 representing the x, y and z-components of a hand landmark"),(0,r.kt)("h3",{id:"function-gettranslations"},"function GetTranslations"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"float[] GetTranslations()\n")),(0,r.kt)("p",null,"Gets the global translation of the hand(s). "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Return"),": An array of floats with each 3 representing the x, y and z-components of a hand translation"),(0,r.kt)("h2",{id:"public-attributes-documentation"},"Public Attributes Documentation"),(0,r.kt)("h3",{id:"variable-landmarkscount"},"variable LandmarksCount"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"static const int LandmarksCount = 21;\n")),(0,r.kt)("p",null,"Number of landmarks per hand. "),(0,r.kt)("p",null,"A landmark is a 3D vector that holds the local translation for each hand bone joint. "),(0,r.kt)("h3",{id:"variable-translationscount"},"variable TranslationsCount"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"static const int TranslationsCount = 1;\n")),(0,r.kt)("p",null,"Number of translations. "),(0,r.kt)("p",null,"For each hand there is a translation, an additional 3D vector (x, y, z), which contains the global translation of the hand in camera space which all hand landmarks should be displaced with to get the landmarks in AR camera space. "),(0,r.kt)("h3",{id:"variable-onupdate"},"variable OnUpdate"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-csharp"},"Action< float[], float[], int[], float[]> OnUpdate;\n")),(0,r.kt)("p",null,"Callback returning estimated landmarks, their translations, right-handedness and confidence scores. "),(0,r.kt)("p",null,"The landmark and translation arrays contain consecutive floats which represent the x, y and z-components of a 3D vector."))}d.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.