示例#1
0
        public void GotoNewPosXZ(TVertex NewPos)
        {
            TMat4x4 TransMat = TMat4x4.ZeroMat();
            TMat4x4 RotMatY  = TMat4x4.ZeroMat();

            CurrentPos = NewPos;

            TransMat.SetTrans(NewPos.X, NewPos.Y, NewPos.Z);
            RotMatY.SetRotateY(Math3D.Deg2Rad(Orientation + OrientationOffset));

            SetMatrix(RotMatY.MulMat(TransMat));
        }
示例#2
0
        public void SetPosAndAngle(float X, float Y, float Z, float A, float B, float C)
        {
            TMat4x4 TransMat = TMat4x4.ZeroMat();
            TMat4x4 RotMatX  = TMat4x4.ZeroMat();
            TMat4x4 RotMatY  = TMat4x4.ZeroMat();
            TMat4x4 RotMatZ  = TMat4x4.ZeroMat();

            CurrentPos.Set(X, Y, Z);
            CurrentRot.Set(A, B, C);

            TransMat.SetTrans(X, Y, Z);
            RotMatX.SetRotateX(A);
            RotMatY.SetRotateY(B);
            RotMatZ.SetRotateZ(C);

            SetMatrix(RotMatX.MulMat(RotMatY).MulMat(RotMatZ).MulMat(TransMat));
        }