Ejemplo n.º 1
0
 //
 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;
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 3
0
 // 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();
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 5
0
 public Stroke(JointChain pose_init, JointChain pose_end)
 {
     this.PoseInit = pose_init;
     this.PoseEnd = pose_end;
 }