Пример #1
0
 public void Scaling(float kx, float ky, float kz)
 {
     for (int i = 0; i < Points.Count; i++)
     {
         AT.Scaling(Points[i], kx, ky, kz);
     }
     UpdateCenter();
 }
Пример #2
0
 public void RotateZ(double angle)
 {
     for (int i = 0; i < Points.Count; i++)
     {
         AT.RotateZ(Points[i], angle);
     }
     UpdateCenter();
 }
Пример #3
0
 public void Move(float dx, float dy, float dz)
 {
     for (int i = 0; i < Points.Count; i++)
     {
         AT.Move(Points[i], dx, dy, dz);
     }
     UpdateCenter();
 }
Пример #4
0
        static public PointXYZ Move(PointXYZ p, float dx, float dy, float dz)
        {
            float[,] T = new float[, ] {
                { 1, 0, 0, 0 },
                { 0, 1, 0, 0 },
                { 0, 0, 1, 0 },
                { dx, dy, dz, 1 }
            };

            AT.MatrixMul(p, T);
            return(p);
        }
Пример #5
0
        static public void Scaling(PointXYZ p, float kx, float ky, float kz)
        {
            float[,] scale_matrix =
            {
                { kx,  0,  0, 0 },
                {  0, ky,  0, 0 },
                {  0,  0, kz, 0 },
                {  0,  0,  0, 1 }
            };

            AT.MatrixMul(p, scale_matrix);
        }
Пример #6
0
        static public void RotateZ(PointXYZ p, double angle)
        {
            double rangle = Math.PI * angle / 180;
            float  sin    = (float)Math.Sin(rangle);
            float  cos    = (float)Math.Cos(rangle);

            float[,] rotation_matrix =
            {
                { cos,  sin, 0, 0 },
                { -sin, cos, 0, 0 },
                {    0,   0, 1, 0 },
                {    0,   0, 0, 1 }
            };
            AT.MatrixMul(p, rotation_matrix);
        }