Наследование: Robot.Part
Пример #1
0
        private FromPoint GetFromPoint(LegPosition homeLegPosition, int startPosition, Leg leg)
        {
            FromPoint point;
            switch ((step + startPosition) % 6)
            {
                case 0:
                case 5:
                    point = new FromPoint(homeLegPosition.X, homeLegPosition.Z, homeLegPosition.Y);
                    break;
                default:
                    point = new FromPoint(leg.X, leg.Z, homeLegPosition.Y);
                    break;
            }

            return point;
        }
Пример #2
0
        private void CalculateNextStepRotation(Leg leg, double degrees, double yDistance, FromPoint fromPoint, double centerX, double centerZ)
        {
            double newX;
            double newZ;
            double newY;

            Leg.CalculateNewCoordinatesForRotation(leg.DistanceToX + fromPoint.FromX, leg.DistanceToZ + fromPoint.FromZ, centerX, centerZ, degrees, out newX, out newZ);

            newY = fromPoint.FromY - yDistance;
            leg.SetRealXYZ(newX, newZ, newY);
        }
Пример #3
0
        private void CalculateNextStep(Leg leg, double direction, double distance, double yDistance, FromPoint fromPoint)
        {
            double newX;
            double newZ;
            double newY;

            Leg.CalculateXandZ(direction, distance, leg.Side, fromPoint.FromX, fromPoint.FromZ, out newX, out newZ);
            newY = fromPoint.FromY - yDistance;
            leg.SetXYZ(newX, newZ, newY);
        }
Пример #4
0
        public static void RotateLeg(Leg leg, double degrees, double direction,double xCenter,double zCenter)
        {
            double newX;
            double newZ;
            CalculateNewCoordinatesForRotation(leg.RealX, leg.RealZ, xCenter, zCenter, degrees, out newX, out newZ);
            leg.TotRotation = leg.TotRotation + degrees;

            leg.SetRealXYZ(newX, newZ, leg.Y);
        }
Пример #5
0
        public static void CalculateNewPosition(Leg leg, double distance, double direction, double yDistance)
        {
            double newX;
            double newZ;

            CalculateXandZ(direction, distance,leg.Side, leg.X, leg.Z, out newX, out newZ);
            leg.SetXYZ(newX, newZ, leg.Y - yDistance);
        }
Пример #6
0
 public static void CalculateNewPosition(Leg leg, double distance, double directionInRadian)
 {
     CalculateNewPosition(leg, distance, directionInRadian, 0);
 }