示例#1
0
        /// <summary>
        ///     Creates a new quad by rotate all 4 vertices clockwise about the specified center point
        /// </summary>
        /// <param name="degrees">Angle to rotate clockwise (degrees)</param>
        /// <param name="centerX">X coordinate of point about which to rotate</param>
        /// <param name="centerY">Y coordinate of point about which to rotate</param>
        /// <returns>Returns the rotate quad</returns>
        public Quad Rotate(double degrees, double centerX, double centerY)
        {
            var newBottomLeft  = BottomLeft.Rotate(degrees, centerX, centerY);
            var newTopLeft     = TopLeft.Rotate(degrees, centerX, centerY);
            var newTopRight    = TopRight.Rotate(degrees, centerX, centerY);
            var newBottomRight = BottomRight.Rotate(degrees, centerX, centerY);

            return(new Quad(newBottomLeft, newTopLeft, newTopRight, newBottomRight));
        }