public void UpdateOutput() { // Only update the output if we've set our kinematic model if (model == null) { return; } Point3D point = new Point3D(); point.X = InvertX ? -x : x; point.Y = InvertY ? -y : y; point.Z = InvertZ ? -z : z; double[] angles = model.GetJointAngles(point); for (int i = 0; i < angles.Length; i++) { if (ArmSide == 1 && i == 3) { Outputs[model.OutputNames[i]].Value = -angles[i]; } else { Outputs[model.OutputNames[i]].Value = angles[i]; } } byte r = map(Math.Pow(angles[angles.Length - 3], 2) + Math.Pow(angles[angles.Length - 2], 2) + Math.Pow(angles[angles.Length - 1], 2), 0, 48, 50, 255); HapticColor = new SolidColorBrush(Color.FromRgb(r, 50, 50)); }
public void UpdateOutput() { // Only update the output if we've set our kinematic model if (model == null) { return; } Point3D point = new Point3D(); point.X = InvertX ? -x : x; point.Y = InvertY ? -y : y; point.Z = InvertZ ? -z : z; double[] angles = model.GetJointAngles(point); for (int i = 0; i < angles.Length; i++) { Outputs[model.OutputNames[i]].Value = angles[i]; } }
public void UpdateOutput() { // Only update the output if we've set our kinematic model if (model == null) { return; } Point3D point = new Point3D(); point.X = InvertX ? -ix : ix; point.Y = InvertY ? -iy : iy; point.Z = InvertZ ? -iz : iz; Point3D orient = new Point3D(); orient.X = iroll; orient.Y = ipitch; orient.Z = iyaw; double[] angles = model.GetJointAngles(point, orient); for (int i = 0; i < angles.Length; i++) { Outputs[model.OutputNames[i]].Value = angles[i]; } }
public void UpdateOutput() { // Only update the output if we've set our kinematic model if (model == null) { return; } Point3D pointL = new Point3D(); pointL.X = InvertXL ? -xL : xL; pointL.Y = InvertYL ? -yL : yL; pointL.Z = InvertZL ? -zL : zL; Point3D pointR = new Point3D(); pointR.X = InvertXR ? -xR : xR; pointR.Y = InvertYR ? -yR : yR; pointR.Z = InvertZR ? -zR : zR; double[] angles = model.GetJointAngles(pointL, pointR); for (int i = 0; i < angles.Length; i++) { Outputs[model.OutputNames[i]].Value = angles[i]; } }