Esempio n. 1
0
        public void AddLaserSpotRangeAngles(int spotsToLeft, int spotsToRight)
        {
            QuaternionAngle originAngle = new QuaternionAngle(0, 0, 0);

            for (int i = spotsToLeft; i <= spotsToRight; i++)
            {
                Tuple <Vector3f, QuaternionAngle> laserSpot = MoveLaser(originAngle, TomCore, 560, i);
                AddLaserSpot(laserSpot.Item1, new QuaternionAngle((15 * i), 0, 0, 0));
            }
        }
Esempio n. 2
0
        public void AddLaserSpotRange(int spotsToLeft, int spotsToRight, QuaternionAngle offset, bool flipped = false)
        {
            QuaternionAngle originAngle = new QuaternionAngle(-90 + offset.angleYaw, -90 + offset.anglePitch, offset.angleRoll);

            if (!Section3Flag)
            {
                IsFlipped = flipped;
                for (int i = spotsToLeft; i <= spotsToRight; i++)
                {
                    Tuple <Vector3f, QuaternionAngle> laserSpot = MoveLaser(originAngle, TomCore, 560 * (flipped ? (-1) : 1), i);
                    AddLaserSpot(laserSpot.Item1, laserSpot.Item2);
                }
            }
            else
            {
                for (int i = spotsToLeft; i <= spotsToRight; i++)
                {
                    Tuple <Vector3f, QuaternionAngle> laserSpot = MoveLaser(originAngle, TomCore, 560 * (flipped ? (-1) : 1), i);
                    AddLaserSpot(laserSpot.Item1, new QuaternionAngle(offset.quaternion.x + (15 * i * (offset.quaternion.x > 0 ? (-1) : 1)), 0, 0, 0));
                }
            }
        }
Esempio n. 3
0
 public TomLaser AddLaserRange(int spotsToLeft, int spotsToRight, QuaternionAngle offset, bool flipped = false)
 {
     AddLaserSpotRange(spotsToLeft, spotsToRight, offset, flipped);
     return(this);
 }
Esempio n. 4
0
 public void AddLaserSpot(Vector3f pos, QuaternionAngle angle)
 {
     LaserSpots.Add(new Tuple <Vector3f, QuaternionAngle>(pos, angle));
 }
Esempio n. 5
0
 private Tuple <Vector3f, QuaternionAngle> MoveLaser(QuaternionAngle currAngle, Vector3f center, float r, int steps)
 {
     return(new Tuple <Vector3f, QuaternionAngle>(PosOnCircleRelative(center.X, center.Y, r, steps), GetCirclePointAngle(currAngle, steps)));
 }
Esempio n. 6
0
 private QuaternionAngle GetCirclePointAngle(QuaternionAngle currAngle, int steps)
 {
     return(new QuaternionAngle(CreateQuaternion(currAngle.angleYaw, currAngle.anglePitch + (-steps * 15), currAngle.angleRoll)));
 }
Esempio n. 7
0
 public SpawnPlane(Vector3f a, Quaternion q) : this(a) {
     angle = new QuaternionAngle(q);
 }