private void fillCoords(ref coord[] _coords, KSSJoint _joint, string nodename, XmlNode node)
 {
     _coords[(int)_joint].x = (float)XmlConvert.ToDecimal(node[nodename]["x"].InnerText);
     _coords[(int)_joint].y = (float)XmlConvert.ToDecimal(node[nodename]["y"].InnerText);
     _coords[(int)_joint].theta = (float)XmlConvert.ToDecimal(node[nodename]["theta"].InnerText);
 }
 private XmlElement PoseElement(string _name, KSSJoint _joint, XmlDocument _xmlDoc)
 {
     XmlText x;
     XmlText y;
     XmlText theta;
     XmlElement element = _xmlDoc.CreateElement(_name);
     XmlElement X = _xmlDoc.CreateElement("x");
     XmlElement Y = _xmlDoc.CreateElement("y");
     XmlElement Theta = _xmlDoc.CreateElement("theta");
     x = _xmlDoc.CreateTextNode(player[(int)_joint].x.ToString());
     y = _xmlDoc.CreateTextNode(player[(int)_joint].y.ToString());
     theta = _xmlDoc.CreateTextNode(player[(int)_joint].theta.ToString());
     X.AppendChild(x);
     Y.AppendChild(y);
     Theta.AppendChild(theta);
     element.AppendChild(X);
     element.AppendChild(Y);
     element.AppendChild(Theta);
     return element;
 }
 private LineGeometry getLine(KSSJoint _start, KSSJoint _end, coord[] _pose)
 {
     return new LineGeometry(new Point(_pose[(int)_start].x, _pose[(int)_start].y), new Point(_pose[(int)_end].x, _pose[(int)_end].y));
 }
 private float CalculateTheta(float _x, float _y, KSSJoint _joint, ref coord[] _coords)
 {
     float theta;
     theta = (float)Math.Atan2((double)(_y - _coords[(int)_joint].y), (double)(_coords[(int)_joint].x - _x));
     return theta;
 }