Example #1
0
 /// <summary>
 ///Copies the data member values of the current SingleShapeSegmentEntity 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::QuadrupedRobot.Proxy.SingleShapeSegmentEntity typedTarget = ((global::QuadrupedRobot.Proxy.SingleShapeSegmentEntity)(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 QuadrupedRobot_SingleShapeSegmentEntity_TO_QuadrupedRobot_Proxy_SingleShapeSegmentEntity(object transformFrom)
 {
     global::QuadrupedRobot.Proxy.SingleShapeSegmentEntity target = new global::QuadrupedRobot.Proxy.SingleShapeSegmentEntity();
     global::QuadrupedRobot.SingleShapeSegmentEntity from = ((global::QuadrupedRobot.SingleShapeSegmentEntity)(transformFrom));
     global::Microsoft.Robotics.PhysicalModel.Joint tmp = from.CustomJoint;
     if ((tmp != null)) {
         target.CustomJoint = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Joint)(Microsoft_Robotics_PhysicalModel_Proxy_Joint_TO_Microsoft_Robotics_PhysicalModel_Proxy_Joint0(tmp)));
     }
     global::Microsoft.Robotics.Simulation.Physics.BoxShape tmp0 = from.BoxShape;
     if ((tmp0 != null)) {
         target.BoxShape = ((global::Microsoft.Robotics.Simulation.Physics.Proxy.BoxShape)(Microsoft_Robotics_Simulation_Physics_Proxy_BoxShape_TO_Microsoft_Robotics_Simulation_Physics_Proxy_BoxShape0(tmp0)));
     }
     global::Microsoft.Robotics.Simulation.Physics.SphereShape tmp1 = from.SphereShape;
     if ((tmp1 != null)) {
         target.SphereShape = ((global::Microsoft.Robotics.Simulation.Physics.Proxy.SphereShape)(Microsoft_Robotics_Simulation_Physics_Proxy_SphereShape_TO_Microsoft_Robotics_Simulation_Physics_Proxy_SphereShape0(tmp1)));
     }
     global::Microsoft.Robotics.Simulation.Physics.CapsuleShape tmp2 = from.CapsuleShape;
     if ((tmp2 != null)) {
         target.CapsuleShape = ((global::Microsoft.Robotics.Simulation.Physics.Proxy.CapsuleShape)(Microsoft_Robotics_Simulation_Physics_Proxy_CapsuleShape_TO_Microsoft_Robotics_Simulation_Physics_Proxy_CapsuleShape0(tmp2)));
     }
     target.Flags = ((global::Microsoft.Robotics.Simulation.Engine.Proxy.VisualEntityProperties)(((int)(from.Flags))));
     target.ChildCount = from.ChildCount;
     global::Microsoft.Robotics.PhysicalModel.Joint tmp3 = from.ParentJoint;
     if ((tmp3 != null)) {
         target.ParentJoint = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Joint)(Microsoft_Robotics_PhysicalModel_Proxy_Joint_TO_Microsoft_Robotics_PhysicalModel_Proxy_Joint0(tmp3)));
     }
     target.ReferenceFrame = ((global::Microsoft.Robotics.Simulation.Engine.Proxy.VisualEntity.ReferenceFrames)(((int)(from.ReferenceFrame))));
     target.ServiceContract = from.ServiceContract;
     global::System.Collections.Generic.List<string> tmp4 = from.EmbeddedResourceAssemblies;
     if ((tmp4 != null)) {
         int count = tmp4.Count;
         global::System.Collections.Generic.List<string> tmp5 = new global::System.Collections.Generic.List<string>(count);
         tmp5.AddRange(tmp4);
         target.EmbeddedResourceAssemblies = tmp5;
     }
     global::Microsoft.Robotics.PhysicalModel.Vector3 tmp6 = from.MeshScale;
     target.MeshScale = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Vector3)(Microsoft_Robotics_PhysicalModel_Proxy_Vector3_TO_Microsoft_Robotics_PhysicalModel_Proxy_Vector30(tmp6)));
     global::Microsoft.Robotics.PhysicalModel.Vector3 tmp7 = from.MeshRotation;
     target.MeshRotation = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Vector3)(Microsoft_Robotics_PhysicalModel_Proxy_Vector3_TO_Microsoft_Robotics_PhysicalModel_Proxy_Vector30(tmp7)));
     global::Microsoft.Robotics.PhysicalModel.Vector3 tmp8 = from.MeshTranslation;
     target.MeshTranslation = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Vector3)(Microsoft_Robotics_PhysicalModel_Proxy_Vector3_TO_Microsoft_Robotics_PhysicalModel_Proxy_Vector30(tmp8)));
     global::Microsoft.Robotics.Simulation.EntityState tmp9 = from.State;
     if ((tmp9 != null)) {
         target.State = ((global::Microsoft.Robotics.Simulation.Proxy.EntityState)(Microsoft_Robotics_Simulation_Proxy_EntityState_TO_Microsoft_Robotics_Simulation_Proxy_EntityState0(tmp9)));
     }
     return target;
 }
Example #3
0
 /// <summary>
 ///Clones SingleShapeSegmentEntity
 ///</summary>
 ///<returns>cloned value</returns>
 public override object Clone()
 {
     global::QuadrupedRobot.Proxy.SingleShapeSegmentEntity target0 = new global::QuadrupedRobot.Proxy.SingleShapeSegmentEntity();
     this.CopyTo(target0);
     return(target0);
 }