public override void Rotate(float SIN, float COS)
        {
            if (OnRotateStart != null)
            {
                if (!OnRotateStart.Invoke(this, SIN, COS))
                {
                    return;
                }
            }

            if (OnRotating != null)
            {
                OnRotating.Invoke(this, SIN, COS);
            }

            foreach (GlFigure F in this.figuresAmount)
            {
                F.Rotate(SIN, COS);
            }

            if (OnRotated != null)
            {
                OnRotated.Invoke(this, SIN, COS);
            }
        }
Exemple #2
0
        public override void Rotate(float SIN, float COS)
        {
            float oldX = this.Center.X;
            float oldY = this.Center.Y;

            if (OnRotateStart != null)
            {
                if (!OnRotateStart.Invoke(this, SIN, COS))
                {
                    return;
                }
            }

            if (OnRotating != null)
            {
                OnRotating.Invoke(this, SIN, COS);
            }

            this.directVector = this.directVector.getRotatedVector(-SIN, COS);
            updatePointsPosition();

            if (OnRotated != null)
            {
                OnRotated.Invoke(this, SIN, COS);
            }
        }
Exemple #3
0
        public override void Rotate(float SIN, float COS)
        {
            if (OnRotateStart != null)
            {
                if (!OnRotateStart.Invoke(this, SIN, COS))
                {
                    return;
                }
            }

            if (OnRotating != null)
            {
                OnRotating.Invoke(this, SIN, COS);
            }

            for (int i = 0; i < vertexes.Length; i++)
            {
                vertexes[i] = new GlVectorR2(vertexes[i].X - polyCenter.X, vertexes[i].Y - polyCenter.Y).getRotatedVector(-SIN, COS).fromPointToPoint(polyCenter);
            }

            if (OnRotated != null)
            {
                OnRotated.Invoke(this, SIN, COS);
            }
        }
Exemple #4
0
 public void Rotate(double degrees)
 {
     if (degrees != 0)
     {
         Velocity.Angle.Degrees += degrees;
         Invalidate();
         OnRotated?.Invoke(this);
     }
 }
Exemple #5
0
        /// <summary>
        /// Rotates the point around itself
        /// </summary>
        /// <param name="SIN">sin of counter-wise rotation angle</param>
        /// <param name="COS">cos of counter-wise rotation angle</param>
        public override void Rotate(float SIN, float COS)
        {
            if (OnRotateStart != null)
            {
                if (!OnRotateStart.Invoke(this, SIN, COS))
                {
                    return;
                }
            }

            if (OnRotating != null)
            {
                OnRotating.Invoke(this, SIN, COS);
            }

            if (OnRotated != null)
            {
                OnRotated.Invoke(this, SIN, COS);
            }

            return;
        }
Exemple #6
0
        public override void Rotate(float SIN, float COS)
        {
            if (OnRotateStart != null)
            {
                if (!OnRotateStart.Invoke(this, SIN, COS))
                {
                    return;
                }
            }

            if (OnRotating != null)
            {
                OnRotating.Invoke(this, SIN, COS);
            }

            this.directVector = this.DirectVector.getRotatedVector(-SIN, COS);

            if (OnRotated != null)
            {
                OnRotated.Invoke(this, SIN, COS);
            }
        }
Exemple #7
0
 private void HandleRotateCWClicked()
 {
     OnRotated?.Invoke("cw");
 }