public static Dictionary <string, object> Decompose(Restraint restraint) { // Return outputs return(new Dictionary <string, object> { { "Tx", restraint.u1 }, { "Ty", restraint.u2 }, { "Tz", restraint.u3 }, { "Rx", restraint.r1 }, { "Ry", restraint.r2 }, { "Rz", restraint.r3 } }); }
public static Dictionary<string, object> Decompose(Restraint restraint) { // Return outputs return new Dictionary<string, object> { {"Tx", restraint.u1}, {"Ty", restraint.u2}, {"Tz", restraint.u3}, {"Rx", restraint.r1}, {"Ry", restraint.r2}, {"Rz", restraint.r3} }; }
/// <summary> /// Set Restraints to Joint /// </summary> /// <param name="Joint">Joint</param> /// <param name="Restraint">Restraint</param> /// <returns></returns> public static Joint SetRestraint( Joint Joint, Restraint Restraint ) { // Create a new Joint using the properties of the input Joint Joint newJoint = Joint.FromPoint(Joint.BasePoint); // Create label newJoint.Label = String.Format("dyn_{0}", Joint.ID.ToString()); // set the restraint newJoint.JointRestraint = Restraint; return newJoint; }