从文本文件创建骨架

时间:2013-09-04 12:32:38

标签: c# kinect

我想从包含joint / x / y / z的文本文件创建一个骨架 我有创建关节的问题

string[] JointPoints = line.Split('/');
float x = (float)Convert.ToDouble(JointPoints[1]);
float y = (float)Convert.ToDouble(JointPoints[2]);
float z = (float)Convert.ToDouble(JointPoints[3]);
Joint j = new Joint();
var pos = j.Position;

switch (JointPoints[0].ToUpper())
{
case "HEAD":
//j.JointType = JointType.Head; <--- Can't do this, 
pos.X = x;pos.Y = y;pos.Z = z;
playSkeleton.Joints[JointType.Head] = j;
break;

0 个答案:

没有答案