void drawClaw() { glColor3f (0.0, 1.0, 0.0); GLUquadricObj *claw = gluNewQuadric(); gluQuadricDrawStyle (claw, GLU_FILL); gluCylinder (claw, ClawR, ClawR, ClawL, 6, 4); glPushMatrix(); glTranslatef(0.0, 0.0, ClawL); glRotatef(-FingerAngle, 0.0, 1.0, 0.0); drawFinger(); glPopMatrix(); }
//-------------------------------------------------------------- void LeapVisualizer::drawFingers (Hand & hand,ofxLeapMotion & leap){ // For each finger in the Hand, FingerList fingers = hand.fingers(); for (int f=0; f<fingers.count(); f++){ // Get the current finger, and it's type (index, thumb, etc.); const Finger & finger = fingers[f]; if (finger.isValid()){ drawFinger(finger,leap); } //end if finger isValid() } // end for each finger }