예제 #1
0
        static public bool checkType(IntPtr l, int p, out Quaternion q)
        {
            float x, y, z, w;

            LuaDLL.luaS_checkQuaternion(l, p, out x, out y, out z, out w);
            q = new Quaternion(x, y, z, w);
            return(true);
        }
예제 #2
0
        static public bool checkType(IntPtr l, int p, out Quaternion q)
        {
            float x, y, z, w;

            if (LuaDLL.luaS_checkQuaternion(l, p, out x, out y, out z, out w) != 0)
            {
                throw new Exception(string.Format("Invalid quaternion argument at {0}", p));
            }
            q = new Quaternion(x, y, z, w);
            return(true);
        }