Kinect:将关节类型指定为从现有坐标读取结构(从文件重绘骨架)

时间:2016-04-13 17:55:41

标签: c# kinect

我试图修改Joint类的JointType,这是代码的一部分:

Joint currentJoint = new Joint();
SkeletonPoint position = currentJoint.Position;
currentJoint.TrackingState = JointTrackingState.NotTracked;
position.X = -1;
position.Y = -1;
position.Z = -1;

currentJoint.Position = position;
currentJoint.JointType = JointType.AnkleLeft;

if (_joint._jointType == "AnkleLeft")
    currentJoint.JointType = JointType.AnkleLeft;
if (_joint._jointType == "AnkleRight")
    currentJoint.JointType = JointType.AnkleRight;
if (_joint._jointType == "ElbowLeft")

我无法让这一行currentJoint.JointType = JointType.AnkleLeft;起作用,它说

  

Joint.JointType'无法分配给 - 它是只读的

我试过这样:

JointType cjoint = currentJoint.JointType;
cjoint = JointType.AnkleLeft;
currentJoint.JointType = cjoint;

但它不起作用。

提前谢谢!

0 个答案:

没有答案