Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. // Declare a Prepose program named “soccer”
  2.  
  3. APP soccer:
  4.  
  5.  
  6.  
  7.        // We are building the “ola” or “wave” gesture
  8.  
  9.        // An app can have multiple gestures
  10.  
  11.        GESTURE ola:
  12.  
  13.  
  14.  
  15.               // A gesture is composed of poses
  16.  
  17.               // Poses specify a target skeleton position
  18.  
  19.               POSE wrists_down:
  20.  
  21.  
  22.  
  23.               // use the “point” verb on body parts
  24.  
  25.               // Down means orient the joint below the origin point at the hips
  26.  
  27.               point your left wrist down,
  28.  
  29.               point your right wrist down,
  30.  
  31.  
  32.  
  33.               // pointing down is not natural, rotation needed
  34.  
  35.               rotate your left wrist 30 degrees to your front,
  36.  
  37.               rotate your right wrist 30 degrees to your front,
  38.  
  39.  
  40.  
  41.               point your head up,
  42.  
  43.               rotate your head 20 degrees to your front.            
  44.  
  45.  
  46.  
  47.  
  48.  
  49.               // We need more than one pose declared, so let’s create the next pose
  50.  
  51.               // NOTE: poses can be declared in any order, not necessarily the order
  52.  
  53.               // the user performs them to do the gesture.
  54.  
  55.               // We will specify the order of poses in the EXECUTION: section below.
  56.  
  57.               POSE ola_middle:
  58.  
  59.  
  60.  
  61.               // Prepose supports groups of body parts
  62.  
  63.               // “your wrists” is the same as “your left wrist” and “your right wrist”
  64.  
  65.               point your wrists to your front.
  66.  
  67.  
  68.  
  69.  
  70.  
  71.               // We need more than one pose, so let’s create another one
  72.  
  73.               POSE wrists_up:
  74.  
  75.               //put your hands above your head.
  76.  
  77.               point your wrists up,
  78.  
  79.               point your head up.
  80.  
  81.  
  82.  
  83.               // Execution gives us a sequence of poses to match in sequence
  84.  
  85.               // Commas separate each pose in the sequence
  86.  
  87.               // We can re-use any pose declared in the app
  88.  
  89.               // that includes poses not declared in this gesture (not shown) 
  90.  
  91.               EXECUTION:
  92.  
  93.               wrists_down,
  94.  
  95.               // we need more steps
  96.  
  97.               ola_middle,
  98.  
  99.               wrists_up,
  100.  
  101.               // complete the execution
  102.  
  103.               ola_middle,
  104.  
  105. wrists_down.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement