SetIdentity() private method

private SetIdentity ( ) : void
return void
コード例 #1
0
        public Matrix3()
        {
            Identity3();

            Matrix3D m3 = new Matrix3D();

            m3.SetIdentity();

        }
コード例 #2
0
        public Needle()
        {
            kinematics = new NeedleKinematics();

            // initializing the center, head and tail
            center = new Matrix3D();
            center.SetIdentity();
            head0 = new Matrix3D();
            head0.SetIdentity();
            head0.M14 = -radius;
            tail0 = new Matrix3D();
            tail0.SetIdentity();
            tail0.M14 = radius;
            real_half = new Vector3D[n];
            imag_half = new Vector3D[n];

            // initializing points
            for (int i = 0; i < n; i++)
            {
                real_half[i].X = radius * Math.Cos((double)i / (n - 1) * Math.PI);
                real_half[i].Y = -radius * Math.Sin((double)i / (n - 1) * Math.PI);
                real_half[i].Z = 0;

                imag_half[i].X = -radius * Math.Cos((double)i / (n - 1) * Math.PI);
                imag_half[i].Y = radius * Math.Sin((double)i / (n - 1) * Math.PI);
                imag_half[i].Z = 0;
            }

            // initializing the moved head
            double angle = -Math.PI / (n - 1);
            Matrix3D rotZ = new Matrix3D(Math.Cos(angle), -Math.Sin(angle), 0, 0,
                                        Math.Sin(angle), Math.Cos(angle), 0, 0,
                                        0, 0, 1, 0,
                                        0, 0, 0, 1);
            moved_head0 = Matrix3D.Multiply(rotZ, head0);
        }