Parcourir la source

Merge pull request #545 from seanpaultaylor/next

Fixed lua generated files for Physics.
Sean Paul Taylor il y a 13 ans
Parent
commit
a00ca4bc3f

+ 0 - 228
gameplay/src/lua/lua_PhysicsRigidBody.cpp

@@ -549,52 +549,6 @@ int lua_PhysicsRigidBody_getAngularFactor(lua_State* state)
     return 0;
 }
 
-int lua_PhysicsRigidBody_getAngularFactor(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 1:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA))
-            {
-                PhysicsRigidBody* instance = getInstance(state);
-                void* returnPtr = (void*)new Vector3(instance->getAngularFactor());
-                if (returnPtr)
-                {
-                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
-                    object->instance = returnPtr;
-                    object->owns = true;
-                    luaL_getmetatable(state, "Vector3");
-                    lua_setmetatable(state, -2);
-                }
-                else
-                {
-                    lua_pushnil(state);
-                }
-
-                return 1;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_getAngularFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 1).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
 int lua_PhysicsRigidBody_getAngularVelocity(lua_State* state)
 {
     // Get the number of parameters.
@@ -963,53 +917,6 @@ int lua_PhysicsRigidBody_getLinearFactor(lua_State* state)
     return 0;
 }
 
-int lua_PhysicsRigidBody_getLinearFactor(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 1:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA))
-            {
-                PhysicsRigidBody* instance = getInstance(state);
-                void* returnPtr = (void*)new Vector3(instance->getLinearFactor());
-                if (returnPtr)
-                {
-                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
-                    object->instance = returnPtr;
-                    object->owns = true;
-                    luaL_getmetatable(state, "Vector3");
-                    lua_setmetatable(state, -2);
-                }
-                else
-                {
-                    lua_pushnil(state);
-                }
-
-                return 1;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_getLinearFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 1).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
-
 int lua_PhysicsRigidBody_getLinearVelocity(lua_State* state)
 {
     // Get the number of parameters.
@@ -1559,72 +1466,6 @@ int lua_PhysicsRigidBody_setAngularFactor(lua_State* state)
     return 0;
 }
 
-int lua_PhysicsRigidBody_setAngularFactor(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 2:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
-
-                PhysicsRigidBody* instance = getInstance(state);
-                instance->setAngularFactor(*param1);
-                
-                return 0;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_setAngularFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        case 4:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                lua_type(state, 2) == LUA_TNUMBER &&
-                lua_type(state, 3) == LUA_TNUMBER &&
-                lua_type(state, 4) == LUA_TNUMBER)
-            {
-                // Get parameter 1 off the stack.
-                float param1 = (float)luaL_checknumber(state, 2);
-
-                // Get parameter 2 off the stack.
-                float param2 = (float)luaL_checknumber(state, 3);
-
-                // Get parameter 3 off the stack.
-                float param3 = (float)luaL_checknumber(state, 4);
-
-                PhysicsRigidBody* instance = getInstance(state);
-                instance->setAngularFactor(param1, param2, param3);
-                
-                return 0;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_setAngularFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
 int lua_PhysicsRigidBody_setAngularVelocity(lua_State* state)
 {
     // Get the number of parameters.
@@ -1987,75 +1828,6 @@ int lua_PhysicsRigidBody_setKinematic(lua_State* state)
 }
 
 int lua_PhysicsRigidBody_setLinearFactor(lua_State* state)
-<<<<<<< HEAD
-=======
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 2:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
-
-                PhysicsRigidBody* instance = getInstance(state);
-                instance->setLinearFactor(*param1);
-                
-                return 0;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_setLinearFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        case 4:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                lua_type(state, 2) == LUA_TNUMBER &&
-                lua_type(state, 3) == LUA_TNUMBER &&
-                lua_type(state, 4) == LUA_TNUMBER)
-            {
-                // Get parameter 1 off the stack.
-                float param1 = (float)luaL_checknumber(state, 2);
-
-                // Get parameter 2 off the stack.
-                float param2 = (float)luaL_checknumber(state, 3);
-
-                // Get parameter 3 off the stack.
-                float param3 = (float)luaL_checknumber(state, 4);
-
-                PhysicsRigidBody* instance = getInstance(state);
-                instance->setLinearFactor(param1, param2, param3);
-                
-                return 0;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBody_setLinearFactor - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
-int lua_PhysicsRigidBody_setLinearVelocity(lua_State* state)
->>>>>>> master
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);

+ 0 - 4
gameplay/src/lua/lua_PhysicsRigidBody.h

@@ -25,8 +25,6 @@ int lua_PhysicsRigidBody_getLinearVelocity(lua_State* state);
 int lua_PhysicsRigidBody_getMass(lua_State* state);
 int lua_PhysicsRigidBody_getNode(lua_State* state);
 int lua_PhysicsRigidBody_getRestitution(lua_State* state);
-int lua_PhysicsRigidBody_getLinearFactor(lua_State* state);
-int lua_PhysicsRigidBody_getAngularFactor(lua_State* state);
 int lua_PhysicsRigidBody_getShapeType(lua_State* state);
 int lua_PhysicsRigidBody_getType(lua_State* state);
 int lua_PhysicsRigidBody_isDynamic(lua_State* state);
@@ -45,8 +43,6 @@ int lua_PhysicsRigidBody_setKinematic(lua_State* state);
 int lua_PhysicsRigidBody_setLinearFactor(lua_State* state);
 int lua_PhysicsRigidBody_setLinearVelocity(lua_State* state);
 int lua_PhysicsRigidBody_setRestitution(lua_State* state);
-int lua_PhysicsRigidBody_setLinearFactor(lua_State* state);
-int lua_PhysicsRigidBody_setAngularFactor(lua_State* state);
 
 void luaRegister_PhysicsRigidBody();
 

+ 0 - 128
gameplay/src/lua/lua_PhysicsRigidBodyParameters.cpp

@@ -557,126 +557,6 @@ int lua_PhysicsRigidBodyParameters__init(lua_State* state)
             lua_error(state);
             break;
         }
-        case 8:
-        {
-            if (lua_type(state, 1) == LUA_TNUMBER &&
-                lua_type(state, 2) == LUA_TNUMBER &&
-                lua_type(state, 3) == LUA_TNUMBER &&
-                lua_type(state, 4) == LUA_TNUMBER &&
-                lua_type(state, 5) == LUA_TNUMBER &&
-                lua_type(state, 6) == LUA_TBOOLEAN &&
-                (lua_type(state, 7) == LUA_TUSERDATA || lua_type(state, 7) == LUA_TNIL) &&
-                (lua_type(state, 8) == LUA_TUSERDATA || lua_type(state, 8) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                float param1 = (float)luaL_checknumber(state, 1);
-
-                // Get parameter 2 off the stack.
-                float param2 = (float)luaL_checknumber(state, 2);
-
-                // Get parameter 3 off the stack.
-                float param3 = (float)luaL_checknumber(state, 3);
-
-                // Get parameter 4 off the stack.
-                float param4 = (float)luaL_checknumber(state, 4);
-
-                // Get parameter 5 off the stack.
-                float param5 = (float)luaL_checknumber(state, 5);
-
-                // Get parameter 6 off the stack.
-                bool param6 = ScriptUtil::luaCheckBool(state, 6);
-
-                // Get parameter 7 off the stack.
-                ScriptUtil::LuaArray<Vector3> param7 = ScriptUtil::getObjectPointer<Vector3>(7, "Vector3", true);
-
-                // Get parameter 8 off the stack.
-                ScriptUtil::LuaArray<Vector3> param8 = ScriptUtil::getObjectPointer<Vector3>(8, "Vector3", true);
-
-                void* returnPtr = (void*)new PhysicsRigidBody::Parameters(param1, param2, param3, param4, param5, param6, *param7, *param8);
-                if (returnPtr)
-                {
-                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
-                    object->instance = returnPtr;
-                    object->owns = true;
-                    luaL_getmetatable(state, "PhysicsRigidBodyParameters");
-                    lua_setmetatable(state, -2);
-                }
-                else
-                {
-                    lua_pushnil(state);
-                }
-
-                return 1;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBodyParameters__init - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
-        case 9:
-        {
-            if (lua_type(state, 1) == LUA_TNUMBER &&
-                lua_type(state, 2) == LUA_TNUMBER &&
-                lua_type(state, 3) == LUA_TNUMBER &&
-                lua_type(state, 4) == LUA_TNUMBER &&
-                lua_type(state, 5) == LUA_TNUMBER &&
-                lua_type(state, 6) == LUA_TBOOLEAN &&
-                (lua_type(state, 7) == LUA_TUSERDATA || lua_type(state, 7) == LUA_TNIL) &&
-                (lua_type(state, 8) == LUA_TUSERDATA || lua_type(state, 8) == LUA_TNIL) &&
-                (lua_type(state, 9) == LUA_TUSERDATA || lua_type(state, 9) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                float param1 = (float)luaL_checknumber(state, 1);
-
-                // Get parameter 2 off the stack.
-                float param2 = (float)luaL_checknumber(state, 2);
-
-                // Get parameter 3 off the stack.
-                float param3 = (float)luaL_checknumber(state, 3);
-
-                // Get parameter 4 off the stack.
-                float param4 = (float)luaL_checknumber(state, 4);
-
-                // Get parameter 5 off the stack.
-                float param5 = (float)luaL_checknumber(state, 5);
-
-                // Get parameter 6 off the stack.
-                bool param6 = ScriptUtil::luaCheckBool(state, 6);
-
-                // Get parameter 7 off the stack.
-                ScriptUtil::LuaArray<Vector3> param7 = ScriptUtil::getObjectPointer<Vector3>(7, "Vector3", true);
-
-                // Get parameter 8 off the stack.
-                ScriptUtil::LuaArray<Vector3> param8 = ScriptUtil::getObjectPointer<Vector3>(8, "Vector3", true);
-                
-                // Get parameter 9 off the stack.
-                ScriptUtil::LuaArray<Vector3> param9 = ScriptUtil::getObjectPointer<Vector3>(9, "Vector3", true);
-
-                void* returnPtr = (void*)new PhysicsRigidBody::Parameters(param1, param2, param3, param4, param5, param6, *param7, *param8, *param9);
-                if (returnPtr)
-                {
-                    ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
-                    object->instance = returnPtr;
-                    object->owns = true;
-                    luaL_getmetatable(state, "PhysicsRigidBodyParameters");
-                    lua_setmetatable(state, -2);
-                }
-                else
-                {
-                    lua_pushnil(state);
-                }
-
-                return 1;
-            }
-            else
-            {
-                lua_pushstring(state, "lua_PhysicsRigidBodyParameters__init - Failed to match the given parameters to a valid function signature.");
-                lua_error(state);
-            }
-            break;
-        }
         default:
         {
             lua_pushstring(state, "Invalid number of parameters (expected 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9).");
@@ -729,7 +609,6 @@ int lua_PhysicsRigidBodyParameters_angularFactor(lua_State* state)
     if (lua_gettop(state) == 2)
     {
         // Get parameter 2 off the stack.
-<<<<<<< HEAD
         bool param2Valid;
         ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param2Valid);
         if (!param2Valid)
@@ -737,9 +616,6 @@ int lua_PhysicsRigidBodyParameters_angularFactor(lua_State* state)
             lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
             lua_error(state);
         }
-=======
-        ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
->>>>>>> master
 
         instance->angularFactor = *param2;
         return 0;
@@ -908,7 +784,6 @@ int lua_PhysicsRigidBodyParameters_linearFactor(lua_State* state)
     if (lua_gettop(state) == 2)
     {
         // Get parameter 2 off the stack.
-<<<<<<< HEAD
         bool param2Valid;
         ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param2Valid);
         if (!param2Valid)
@@ -916,9 +791,6 @@ int lua_PhysicsRigidBodyParameters_linearFactor(lua_State* state)
             lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
             lua_error(state);
         }
-=======
-        ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
->>>>>>> master
 
         instance->linearFactor = *param2;
         return 0;