コード例 #1
0
        void UpdateRotation(Cell cell, Trackball trackball, Vector4 A_, Vector4 B_)
        {
            float[] A = new float[4] {
                A_.x, A_.y, A_.z, A_.w
            };
            float[] B = new float[4] {
                B_.x, B_.y, B_.z, B_.w
            };

            trackball.rotate(A, B);

            for (int i = 0; i < 24; i++)
            {
                float[] src = new float[4];
                src [0] = cell.srcVertices [i].x;
                src [1] = cell.srcVertices [i].y;
                src [2] = cell.srcVertices [i].z;
                src [3] = cell.srcVertices [i].w;
                float[] dst = new float[4];

                trackball.transform(src, dst);

                cell.updatepoint4(dst, i);
                cell.update_edges();
            }
        }
コード例 #2
0
ファイル: Manager.cs プロジェクト: weathermaker/4dforvive
        public void UpdateRotation(Trackball trackball, Vector4 A_, Vector4 B_)
        {
            float[] A = new float[4] {
                A_.x, A_.y, A_.z, A_.w
            };
            float[] B = new float[4] {
                B_.x, B_.y, B_.z, B_.w
            };

            trackball.rotate(A, B);
        }