//
 public PoseProfile(string posename, JointChain jc, /*double holdtime = Double.NaN,*/ bool isrepeated = false, double interpol = 1.0, double fastrephold = Double.NaN)
 {
     this.ID = posename;
     this.Joints = jc;
     //this.HoldTime = holdtime;
     this.IsRepeated = isrepeated;
     this.RepeatInterpol = interpol;
     this.FastRepeatHoldTime = fastrephold;
 }
Example #2
0
 public virtual JointChain InterpolateJointChain(JointChain jc, double coef)
 {
     if (jc.Name == this.Name)
     {
         return this;
     }
     else
     {
         Debug.WriteLine("PoseInterpolation: joints do not match!");
         return null;
     }
 }
 // Deep Copy Constructor
 public PoseProfile(PoseProfile pp, bool isdeep = true)
 {
     this.ID = pp.ID;
     this.JointInUseNum = pp.JointInUseNum;
     this.IsRepeated = pp.IsRepeated;
     this.RepeatInterpol = pp.RepeatInterpol;
     this.FastRepeatHoldTime = pp.FastRepeatHoldTime;
     //this.SpeedFraction = pp.SpeedFraction;
     if (isdeep == true)
     {
         this.Joints = pp.Joints.DeepCopy();
     }
 }
Example #4
0
 public override JointChain InterpolateJointChain(JointChain jc, double coef)
 {
     Arm arm = (Arm)jc;
     if (jc.Name == this.Name)
     {
         double shldptch = base.Interpolation(this.ShoulderPitch, arm.ShoulderPitch, coef);
         double shldroll = base.Interpolation(this.ShoulderRoll, arm.ShoulderRoll, coef);
         double elbyaw = base.Interpolation(this.ElbowYaw, arm.ElbowYaw, coef);
         double elbroll = base.Interpolation(this.ElbowRoll, arm.ElbowRoll, coef);
         double wrstyaw = base.Interpolation(this.WristYaw, arm.WristYaw, coef);
         double hand = base.Interpolation(this.Hand, arm.Hand, coef);
         if (this.Name == "RArm")
         {
             return new RArm(true, shldptch, shldroll, elbyaw, elbroll, wrstyaw, hand);
         } 
         else // LArm
         {
             return new LArm(true, shldptch, shldroll, elbyaw, elbroll, wrstyaw, hand);
         }
     }
     else
     {
         Debug.WriteLine("PoseInterpolation: joints do not match!");
         return null;
     }
 }
 public Stroke(JointChain pose_init, JointChain pose_end)
 {
     this.PoseInit = pose_init;
     this.PoseEnd = pose_end;
 }