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)); } }
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)); } } }
public TomLaser AddLaserRange(int spotsToLeft, int spotsToRight, QuaternionAngle offset, bool flipped = false) { AddLaserSpotRange(spotsToLeft, spotsToRight, offset, flipped); return(this); }
public void AddLaserSpot(Vector3f pos, QuaternionAngle angle) { LaserSpots.Add(new Tuple <Vector3f, QuaternionAngle>(pos, angle)); }
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))); }
private QuaternionAngle GetCirclePointAngle(QuaternionAngle currAngle, int steps) { return(new QuaternionAngle(CreateQuaternion(currAngle.angleYaw, currAngle.anglePitch + (-steps * 15), currAngle.angleRoll))); }
public SpawnPlane(Vector3f a, Quaternion q) : this(a) { angle = new QuaternionAngle(q); }