Exemple #1
0
        public void Transform(double xScale, double yScale, double theta, int xTranslation, int yTranslation)
        {
            Matrix3 <double> combined = Trans2D.GetTranslationMatrix(xTranslation, yTranslation) * Trans2D.GetRotationMatrix(theta) * Trans2D.GetScalingMatrix(xScale, yScale);

            Start = combined * Start;
            End   = combined * End;
        }
Exemple #2
0
        public void Rotate(double theta)
        {
            Matrix3 <double> mat = Trans2D.GetRotationMatrix(theta);

            Start = mat * Start;
            End   = mat * End;
        }
Exemple #3
0
        public void Translate(int x, int y)
        {
            Matrix3 <double> mat = Trans2D.GetTranslationMatrix(x, y);

            Start = mat * Start;
            End   = mat * End;
        }
Exemple #4
0
        public void Scale(double xScale, double yScale)
        {
            Matrix3 <double> mat = Trans2D.GetScalingMatrix(xScale, yScale);

            Start = mat * Start;
            End   = mat * End;
        }
        public void Transform(double xScale, double yScale, double theta, int xTranslation, int yTranslation)
        {
            Matrix3 <double> mat = Trans2D.GetCombinedMatrix(xScale, yScale, theta, xTranslation, yTranslation);

            for (int i = 0; i < this.Count(); i++)
            {
                m_vertices[i] = mat * m_vertices[i];
            }
        }