c# - filtering the joint which we want to draw -


i playing kinect , want have control drawing every part of human body. make combo box'es :

  • invisible left arm,
  • invisible right arm, ...

and i've connected drawbone method , work. now, try filtering joints lays on invisible bones make them invisible too, have code :

             foreach (joint joint in skeleton.joints)          {              brush drawbrush= null;                if (joint.trackingstate == jointtrackingstate.tracked)              {                  drawbrush = brushes.black;              }              else if (joint.trackingstate == jointtrackingstate.inferred){              drawbrush = new solidcolorbrush(color.blue);              }              if (drawbrush != null)              {                  drawingcontext.drawellipse(drawbrush, null,       this.skeletonpoint(joint.position), 20, 20);              }          } 

i've tryied position

if (joint.position == jointtype.shoulderleft) { return; } 

but error

i'm trying compare in way errors, becouse i' m acting blind kid :/

thx advices

you're comparing position jointtype has no sense. try doing this:

if (joint.jointtype == jointtype.shoulderleft) 

remember position refers spatial position of joint said here

whereas jointtype refers "anatomical name" of tracked joint said here


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -