public static object RobotArm_Proxy_RobotArmState_TO_RobotArm_RobotArmState(object transformFrom) { global::RobotArm.RobotArmState target = new global::RobotArm.RobotArmState(); global::RobotArm.Proxy.RobotArmState from = ((global::RobotArm.Proxy.RobotArmState)(transformFrom)); if ((from.Joints != null)) { int count = from.Joints.Count; global::System.Collections.Generic.List<global::Microsoft.Robotics.PhysicalModel.Proxy.Joint> tmp = new global::System.Collections.Generic.List<global::Microsoft.Robotics.PhysicalModel.Proxy.Joint>(count); for (int index = 0; (index < count); index = (index + 1)) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp0 = default(global::Microsoft.Robotics.PhysicalModel.Proxy.Joint); if ((from.Joints[index] != null)) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp1 = new global::Microsoft.Robotics.PhysicalModel.Proxy.Joint(); ((Microsoft.Dss.Core.IDssSerializable)(from.Joints[index])).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp1))); tmp0 = tmp1; } else { tmp0 = null; } tmp.Add(tmp0); } target.Joints = tmp; } else { target.Joints = null; } target.EndEffectorPose = from.EndEffectorPose; return target; }
/// <summary> ///Deserializes SegmentEntity ///</summary> ///<param name="reader">the reader from which to deserialize</param> ///<returns>deserialized SegmentEntity</returns> public override object Deserialize(System.IO.BinaryReader reader) { base.Deserialize(reader); if ((reader.ReadByte() != 0)) { this._CustomJoint = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Joint)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.PhysicalModel.Proxy.Joint())).Deserialize(reader))); } return(this); }
/// <summary> ///Copies the data member values of the current SegmentEntity to the specified target object ///</summary> ///<param name="target">target object (must be an instance of)</param> public override void CopyTo(Microsoft.Dss.Core.IDssSerializable target) { base.CopyTo(target); global::Humanoid.Proxy.SegmentEntity typedTarget = ((global::Humanoid.Proxy.SegmentEntity)(target)); if ((this._CustomJoint != null)) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp = new global::Microsoft.Robotics.PhysicalModel.Proxy.Joint(); ((Microsoft.Dss.Core.IDssSerializable)(this._CustomJoint)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp))); typedTarget._CustomJoint = tmp; } }
public static object Microsoft_Robotics_PhysicalModel_Proxy_Joint_TO_Microsoft_Robotics_PhysicalModel_Proxy_Joint0(object transformFrom) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint target = new global::Microsoft.Robotics.PhysicalModel.Proxy.Joint(); global::Microsoft.Robotics.PhysicalModel.Joint from = ((global::Microsoft.Robotics.PhysicalModel.Joint)(transformFrom)); global::Microsoft.Robotics.PhysicalModel.JointProperties tmp = from.State; if ((tmp != null)) { target.State = ((global::Microsoft.Robotics.PhysicalModel.Proxy.JointProperties)(Microsoft_Robotics_PhysicalModel_Proxy_JointProperties_TO_Microsoft_Robotics_PhysicalModel_Proxy_JointProperties0(tmp))); } return target; }
public static object Kobush_Simulation_RobotArm_RobotArmState_TO_Kobush_Simulation_RobotArm_Proxy_RobotArmState(object transformFrom) { global::Kobush.Simulation.RobotArm.Proxy.RobotArmState target = new global::Kobush.Simulation.RobotArm.Proxy.RobotArmState(); global::Kobush.Simulation.RobotArm.RobotArmState from = ((global::Kobush.Simulation.RobotArm.RobotArmState)(transformFrom)); global::System.Collections.Generic.List<global::Microsoft.Robotics.PhysicalModel.Proxy.Joint> tmp = from.Joints; if ((tmp != null)) { int count = tmp.Count; global::System.Collections.Generic.List<global::Microsoft.Robotics.PhysicalModel.Proxy.Joint> tmp0 = new global::System.Collections.Generic.List<global::Microsoft.Robotics.PhysicalModel.Proxy.Joint>(count); for (int index = 0; (index < count); index = (index + 1)) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp1 = default(global::Microsoft.Robotics.PhysicalModel.Proxy.Joint); global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp2 = tmp[index]; if ((tmp2 != null)) { global::Microsoft.Robotics.PhysicalModel.Proxy.Joint tmp3 = new global::Microsoft.Robotics.PhysicalModel.Proxy.Joint(); ((Microsoft.Dss.Core.IDssSerializable)(tmp2)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp3))); tmp1 = tmp3; } tmp0.Add(tmp1); } target.Joints = tmp0; } target.EndEffectorPose = from.EndEffectorPose; return target; }