private PXCMGesture.GeoNode QueryGeoNode(PXCMGesture.GeoNode.Label bodyLabel) { var values = new PXCMGesture.GeoNode(); QueryGesture().QueryNodeData(0, bodyLabel, out values); return(values); }
public bool QueryGesture(PXCMGesture.GeoNode.Label body, out PXCMGesture.Gesture data) { if (initialized) { return(QueryGestureC(instance, body, out data)); } data = new PXCMGesture.Gesture(); return(false); }
private void TrackHandAndFingers(Hand hand, PXCMGesture.GeoNode.Label bodyLabel) { var geoNode = QueryGeoNode(bodyLabel); TrackPosition(hand, geoNode); TrackOpeness(hand, geoNode); TrackFingers(hand.Thumb, bodyLabel | PXCMGesture.GeoNode.Label.LABEL_FINGER_THUMB); TrackFingers(hand.Index, bodyLabel | PXCMGesture.GeoNode.Label.LABEL_FINGER_INDEX); TrackFingers(hand.Middle, bodyLabel | PXCMGesture.GeoNode.Label.LABEL_FINGER_MIDDLE); TrackFingers(hand.Ring, bodyLabel | PXCMGesture.GeoNode.Label.LABEL_FINGER_RING); TrackFingers(hand.Pinky, bodyLabel | PXCMGesture.GeoNode.Label.LABEL_FINGER_PINKY); }
private Vector2 GetGeonodeCoordinate(PXCMGesture.GeoNode[][] nodes, PXCMGesture.GeoNode.Label handLabel, PXCMGesture.GeoNode.Label nodeLabel) { Vector2 returnPoint = new Vector2(0, 0); for (int i = 0; i < 12; i++) { if (nodes[0][i].body == (handLabel | nodeLabel)) { returnPoint.x = (int)nodes[0][i].positionImage.x; returnPoint.y = (int)nodes[0][i].positionImage.y; } } return(returnPoint); }
public bool QueryGeoNode(PXCMGesture.GeoNode.Label body, PXCMGesture.GeoNode[] data) { bool found = false; for (int i = 0; i < data.Length; i++, body++) { if (!QueryGeoNode(body, out data[i])) { data[i].body = PXCMGesture.GeoNode.Label.LABEL_ANY; } else { found = true; } } return(found); }
void Start() { xy = new float[2]{157.0f,121.0f}; PG = gameObject.GetComponent<PerCGesture>(); //in start i am just going to initialize the pipeline and get the resolution of the camera //to get the resolution, use the getRez function. myPipe = new PXCUPipeline(); trackedLimb = PXCMGesture.GeoNode.Label.LABEL_BODY_HAND_PRIMARY;// Primary is first tracked hand myMode = PXCUPipeline.Mode.GESTURE|PXCUPipeline.Mode.COLOR_VGA ; //the mode i want to use if(!myPipe.Init(myMode)){ Debug.Log("The pipeline failed to initialize bras :'(\n"); initiated=false; return; } else initiated = true; resFound = myPipe.QueryRGBSize(resolution); centeredX = true; centeredY = true; }
public void restart() { //shut this motha down. if(myPipe != null){ myPipe.Dispose(); myPipe = null; } myPipe = new PXCUPipeline(); trackedLimb = PXCMGesture.GeoNode.Label.LABEL_BODY_HAND_PRIMARY;// Primary is first tracked hand myMode = PXCUPipeline.Mode.GESTURE|PXCUPipeline.Mode.COLOR_VGA ; //the mode i want to use if(!myPipe.Init(myMode)){ Debug.Log("The pipeline failed to initialize bras :'(\n"); initiated=false; return; } else initiated = true; }
private static extern bool QueryGestureC(IntPtr pp, PXCMGesture.GeoNode.Label body, out PXCMGesture.Gesture data);
private void TrackFingers(Item finger, PXCMGesture.GeoNode.Label fingerLabel) { var geoNode = QueryGeoNode(fingerLabel); TrackPosition(finger, geoNode); }
private PXCMGesture.GeoNode QueryGeoNode(PXCMGesture.GeoNode.Label bodyLabel) { PXCMGesture.GeoNode values; _pipeline.QueryGesture().QueryNodeData(0, bodyLabel, out values); return(values); }