示例#1
0
        public static ConcreteJoint CreateInBetweenJoint(ConcreteJoint joint1, ConcreteJoint joint2, int number, int distance)
        {
            if (joint1.Id != joint2.Id)
            {
                throw new ArgumentException("Only the same joint can be in-betweened");
            }

            var newJoint = new ConcreteJoint
            {
                Id        = joint1.Id,
                Radius    = joint1.Radius,
                Thickness = joint1.Thickness,
                Visible   = joint1.Visible,
                Position  = joint1.Position + (joint2.Position - joint1.Position) * number / distance
            };

            return(newJoint);
        }
示例#2
0
 public Line(ConcreteJoint start, ConcreteJoint finish)
 {
     Start  = start;
     Finish = finish;
 }