Skip to content

Instantly share code, notes, and snippets.

@DaveVoyles
Created January 29, 2015 17:39
Show Gist options
  • Save DaveVoyles/40d236c3cd81a7a7763a to your computer and use it in GitHub Desktop.
Save DaveVoyles/40d236c3cd81a7a7763a to your computer and use it in GitHub Desktop.
Kinect Prepose
// Declare a Prepose program named “soccer”
APP soccer:
 
       // We are building the “ola” or “wave” gesture
       // An app can have multiple gestures
       GESTURE ola:
 
              // A gesture is composed of poses
              // Poses specify a target skeleton position
              POSE wrists_down:
 
              // use the “point” verb on body parts
              // Down means orient the joint below the origin point at the hips
              point your left wrist down,
              point your right wrist down,
 
              // pointing down is not natural, rotation needed
              rotate your left wrist 30 degrees to your front,
              rotate your right wrist 30 degrees to your front,
 
              point your head up,
              rotate your head 20 degrees to your front.            
 
 
              // We need more than one pose declared, so let’s create the next pose
              // NOTE: poses can be declared in any order, not necessarily the order
              // the user performs them to do the gesture.
              // We will specify the order of poses in the EXECUTION: section below.
              POSE ola_middle:
 
              // Prepose supports groups of body parts
              // “your wrists” is the same as “your left wrist” and “your right wrist”
              point your wrists to your front.
 
 
              // We need more than one pose, so let’s create another one
              POSE wrists_up:
              //put your hands above your head.
              point your wrists up,
              point your head up.
 
              // Execution gives us a sequence of poses to match in sequence
              // Commas separate each pose in the sequence
              // We can re-use any pose declared in the app
              // that includes poses not declared in this gesture (not shown) 
              EXECUTION:
              wrists_down,
              // we need more steps
              ola_middle,
              wrists_up,
              // complete the execution
              ola_middle,
wrists_down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment