示例#1
0
        public UCS(quaternion O, quaternion Xort, quaternion Yort)
        {
            o = O;

            quaternion I = new quaternion(0.0, (Xort - O).imag());
            quaternion K = new quaternion(0.0, (I * (Yort - O)).imag());
            quaternion J = new quaternion(0.0, (K * I).imag());


            ang.SetAt(1, 1, I.cosToX());
            ang.SetAt(1, 2, J.cosToX());
            ang.SetAt(1, 3, K.cosToX());
            ang.SetAt(2, 1, I.cosToY());
            ang.SetAt(2, 2, J.cosToY());
            ang.SetAt(2, 3, K.cosToY());
            ang.SetAt(3, 1, I.cosToZ());
            ang.SetAt(3, 2, J.cosToZ());
            ang.SetAt(3, 3, K.cosToZ());
        }