Selaa lähdekoodia

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Darryl Gough 12 vuotta sitten
vanhempi
sitoutus
c3de9234f1

+ 199 - 21
gameplay/src/MaterialParameter.cpp

@@ -225,47 +225,225 @@ void MaterialParameter::setValue(const Matrix* values, unsigned int count)
 
 void MaterialParameter::setValue(const Texture::Sampler* sampler)
 {
+    GP_ASSERT(sampler);
     clearValue();
 
+    const_cast<Texture::Sampler*>(sampler)->addRef();
+    _value.samplerValue = sampler;
+    _type = MaterialParameter::SAMPLER;
+}
+
+void MaterialParameter::setValue(const Texture::Sampler** samplers, unsigned int count)
+{
+    GP_ASSERT(samplers);
+    clearValue();
+
+    for (unsigned int i = 0; i < count; ++i)
+    {
+        const_cast<Texture::Sampler*>(samplers[i])->addRef();
+    }
+    _value.samplerArrayValue = samplers;
+    _count = count;
+    _type = MaterialParameter::SAMPLER_ARRAY;
+}
+
+Texture::Sampler* MaterialParameter::setValue(const char* texturePath, bool generateMipmaps)
+{
+    GP_ASSERT(texturePath);
+    clearValue();
+
+    Texture::Sampler* sampler = Texture::Sampler::create(texturePath, generateMipmaps);
     if (sampler)
     {
-        const_cast<Texture::Sampler*>(sampler)->addRef();
         _value.samplerValue = sampler;
         _type = MaterialParameter::SAMPLER;
     }
+    return sampler;
 }
 
-void MaterialParameter::setValue(const Texture::Sampler** samplers, unsigned int count)
+void MaterialParameter::setFloat(float value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setFloatArray(const float* values, unsigned int count, bool copy)
 {
+    GP_ASSERT(values);
     clearValue();
 
-    if (samplers)
+    if (copy)
     {
-        for (unsigned int i = 0; i < count; ++i)
-        {
-            const_cast<Texture::Sampler*>(samplers[i])->addRef();
-        }
-        _value.samplerArrayValue = samplers;
-        _count = count;
-        _type = MaterialParameter::SAMPLER_ARRAY;
+        _value.floatPtrValue = new float[count];
+        memcpy(_value.floatPtrValue, values, sizeof(float) * count);
+        _dynamic = true;
     }
+    else
+    {
+        _value.floatPtrValue = const_cast<float*> (values);
+    }
+
+    _count = count;
+    _type = MaterialParameter::FLOAT_ARRAY;
 }
 
-Texture::Sampler* MaterialParameter::setValue(const char* texturePath, bool generateMipmaps)
+void MaterialParameter::setInt(int value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setIntArray(const int* values, unsigned int count, bool copy)
 {
-    if (texturePath)
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
     {
-        clearValue();
+        _value.intPtrValue = new int[count];
+        memcpy(_value.intPtrValue, values, sizeof(int) * count);
+        _dynamic = true;
+    }
+    else
+    {
+        _value.intPtrValue = const_cast<int*> (values);
+    }
 
-        Texture::Sampler* sampler = Texture::Sampler::create(texturePath, generateMipmaps);
-        if (sampler)
-        {
-            _value.samplerValue = sampler;
-            _type = MaterialParameter::SAMPLER;
-        }
-        return sampler;
+    _count = count;
+    _type = MaterialParameter::INT_ARRAY;
+}
+
+void MaterialParameter::setVector2(const Vector2& value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setVector2Array(const Vector2* values, unsigned int count, bool copy)
+{
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
+    {
+        _value.floatPtrValue = new float[2 * count];
+        memcpy(_value.floatPtrValue, const_cast<float*> (&values[0].x), sizeof(float) * 2 * count);
+        _dynamic = true;
     }
-    return NULL;
+    else
+    {
+        _value.floatPtrValue = const_cast<float*> (&values[0].x);
+    }
+
+    _count = count;
+    _type = MaterialParameter::VECTOR2;
+}
+
+void MaterialParameter::setVector3(const Vector3& value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setVector3Array(const Vector3* values, unsigned int count, bool copy)
+{
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
+    {
+        _value.floatPtrValue = new float[3 * count];
+        memcpy(_value.floatPtrValue, const_cast<float*> (&values[0].x), sizeof(float) * 3 * count);
+        _dynamic = true;
+    }
+    else
+    {
+        _value.floatPtrValue = const_cast<float*> (&values[0].x);
+    }
+
+    _count = count;
+    _type = MaterialParameter::VECTOR3;
+}
+
+void MaterialParameter::setVector4(const Vector4& value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setVector4Array(const Vector4* values, unsigned int count, bool copy)
+{
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
+    {
+        _value.floatPtrValue = new float[4 * count];
+        memcpy(_value.floatPtrValue, const_cast<float*> (&values[0].x), sizeof(float) * 4 * count);
+        _dynamic = true;
+    }
+    else
+    {
+        _value.floatPtrValue = const_cast<float*> (&values[0].x);
+    }
+
+    _count = count;
+    _type = MaterialParameter::VECTOR4;
+}
+
+void MaterialParameter::setMatrix(const Matrix& value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setMatrixArray(const Matrix* values, unsigned int count, bool copy)
+{
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
+    {
+        _value.floatPtrValue = new float[16 * count];
+        memcpy(_value.floatPtrValue, const_cast<Matrix&> (values[0]).m, sizeof(float) * 16 * count);
+        _dynamic = true;
+    }
+    else
+    {
+        _value.floatPtrValue = const_cast<Matrix&> (values[0]).m;
+    }
+
+    _count = count;
+    _type = MaterialParameter::MATRIX;
+}
+
+Texture::Sampler* MaterialParameter::setSampler(const char* texturePath, bool generateMipmaps)
+{
+    return setValue(texturePath, generateMipmaps);
+}
+
+void MaterialParameter::setSampler(const Texture::Sampler* value)
+{
+    setValue(value);
+}
+
+void MaterialParameter::setSamplerArray(const Texture::Sampler** values, unsigned int count, bool copy)
+{
+    GP_ASSERT(values);
+    clearValue();
+
+    if (copy)
+    {
+        _value.samplerArrayValue = new const Texture::Sampler*[count];
+        memcpy(_value.samplerArrayValue, values, sizeof(Texture::Sampler*) * count);
+        _dynamic = true;
+    }
+    else
+    {
+        _value.samplerArrayValue = values;
+    }
+
+    for (unsigned int i = 0; i < count; ++i)
+    {
+        const_cast<Texture::Sampler*>(_value.samplerArrayValue[i])->addRef();
+    }
+
+    _count = count;
+    _type = MaterialParameter::SAMPLER_ARRAY;
 }
 
 void MaterialParameter::bind(Effect* effect)

+ 125 - 0
gameplay/src/MaterialParameter.h

@@ -142,6 +142,131 @@ public:
      */
     Texture::Sampler* setValue(const char* texturePath, bool generateMipmaps);
 
+    /**
+     * Stores a float value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setFloat(float value);
+
+    /**
+     * Stores an array of float values in this parameter.
+     *
+     * @param values The array of values.
+     * @param count The number of values in the array.
+     * @param copy True to make a copy of the array in the material parameter, or false
+     *      to point to the passed in array/pointer (which must be valid for the lifetime
+     *      of the MaterialParameter).
+     */
+    void setFloatArray(const float* values, unsigned int count, bool copy = false);
+
+    /**
+     * Stores an integer value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setInt(int value);
+
+    /**
+     * Stores an array of integer values in this parameter.
+     */
+    void setIntArray(const int* values, unsigned int count, bool copy = false);
+
+    /**
+     * Stores a Vector2 value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setVector2(const Vector2& value);
+
+    /**
+     * Stores an array of Vector2 values in this parameter.
+     *
+     * @param values The array of values.
+     * @param count The number of values in the array.
+     * @param copy True to make a copy of the array in the material parameter, or false
+     *      to point to the passed in array/pointer (which must be valid for the lifetime
+     *      of the MaterialParameter).
+     */
+    void setVector2Array(const Vector2* values, unsigned int count, bool copy = false);
+
+    /**
+     * Stores a Vector3 value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setVector3(const Vector3& value);
+
+    /**
+     * Stores an array of Vector3 values in this parameter.
+     */
+    void setVector3Array(const Vector3* values, unsigned int count, bool copy = false);
+
+    /**
+     * Stores a Vector4 value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setVector4(const Vector4& value);
+
+    /**
+     * Stores an array of Vector4 values in this parameter.
+     *
+     * @param values The array of values.
+     * @param count The number of values in the array.
+     * @param copy True to make a copy of the array in the material parameter, or false
+     *      to point to the passed in array/pointer (which must be valid for the lifetime
+     *      of the MaterialParameter).
+     */
+    void setVector4Array(const Vector4* values, unsigned int count, bool copy = false);
+
+    /**
+     * Stores a Matrix value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setMatrix(const Matrix& value);
+
+    /**
+     * Stores an array of Matrix values in this parameter.
+     *
+     * @param values The array of values.
+     * @param count The number of values in the array.
+     * @param copy True to make a copy of the array in the material parameter, or false
+     *      to point to the passed in array/pointer (which must be valid for the lifetime
+     *      of the MaterialParameter).
+     */
+    void setMatrixArray(const Matrix* values, unsigned int count, bool copy = false);
+
+    /**
+     * Loads a texture sampler from the specified path and sets it as the value of this parameter.
+     *
+     * @param texturePath The path to the texture to set.
+     * @param generateMipmaps True to generate a full mipmap chain for the texture, false otherwise.
+     *
+     * @return The texture sampler that was set for this material parameter.
+     */
+    Texture::Sampler* setSampler(const char* texturePath, bool generateMipmaps);
+
+    /**
+     * Stores a Sampler value in this parameter.
+     *
+     * @param value The value to set.
+     */
+    void setSampler(const Texture::Sampler* value);
+
+    /**
+     * Stores an array of Sampler values in this parameter.
+     *
+     * @param values The array of values.
+     * @param count The number of values in the array.
+     * @param copy True to make a copy of the array in the material parameter, or false
+     *      to point to the passed in array/pointer (which must be valid for the lifetime
+     *      of the MaterialParameter).
+     * @script{ignore}
+     */
+    void setSamplerArray(const Texture::Sampler** values, unsigned int count, bool copy = false);
+
     /**
      * Binds the return value of a class method to this material parameter.
      *

+ 2 - 0
gameplay/src/Properties.h

@@ -387,6 +387,8 @@ public:
      * @param path The string to copy the path to if the file exists.
      * 
      * @return True if the property exists and the file exists, false otherwise.
+     *
+     * @script{ignore}
      */
     bool getPath(const char* name, std::string* path) const;
 

+ 3 - 0
gameplay/src/ScriptController.cpp

@@ -692,6 +692,9 @@ static const char* lua_dofile_function =
     "    end\n"
     "end\n";
 
+/**
+ * @script{ignore}
+ */
 void appendLuaPath(lua_State* state, const char* path)
 {
     lua_getglobal(state, "package");

+ 38 - 0
gameplay/src/lua/lua_FileSystem.cpp

@@ -19,6 +19,7 @@ void luaRegister_FileSystem()
     {
         {"createFileFromAsset", lua_FileSystem_static_createFileFromAsset},
         {"fileExists", lua_FileSystem_static_fileExists},
+        {"getDirectoryName", lua_FileSystem_static_getDirectoryName},
         {"getExtension", lua_FileSystem_static_getExtension},
         {"getResourcePath", lua_FileSystem_static_getResourcePath},
         {"isAbsolutePath", lua_FileSystem_static_isAbsolutePath},
@@ -149,6 +150,43 @@ int lua_FileSystem_static_fileExists(lua_State* state)
     return 0;
 }
 
+int lua_FileSystem_static_getDirectoryName(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_TSTRING || lua_type(state, 1) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(1, false);
+
+                std::string result = FileSystem::getDirectoryName(param1);
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, result.c_str());
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_FileSystem_static_getDirectoryName - 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_FileSystem_static_getExtension(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_FileSystem.h

@@ -8,6 +8,7 @@ namespace gameplay
 int lua_FileSystem__gc(lua_State* state);
 int lua_FileSystem_static_createFileFromAsset(lua_State* state);
 int lua_FileSystem_static_fileExists(lua_State* state);
+int lua_FileSystem_static_getDirectoryName(lua_State* state);
 int lua_FileSystem_static_getExtension(lua_State* state);
 int lua_FileSystem_static_getResourcePath(lua_State* state);
 int lua_FileSystem_static_isAbsolutePath(lua_State* state);

+ 36 - 0
gameplay/src/lua/lua_Joint.cpp

@@ -104,6 +104,7 @@ void luaRegister_Joint()
         {"getWorldViewMatrix", lua_Joint_getWorldViewMatrix},
         {"getWorldViewProjectionMatrix", lua_Joint_getWorldViewProjectionMatrix},
         {"hasTag", lua_Joint_hasTag},
+        {"isStatic", lua_Joint_isStatic},
         {"release", lua_Joint_release},
         {"removeAllChildren", lua_Joint_removeAllChildren},
         {"removeChild", lua_Joint_removeChild},
@@ -3934,6 +3935,41 @@ int lua_Joint_hasTag(lua_State* state)
     return 0;
 }
 
+int lua_Joint_isStatic(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))
+            {
+                Joint* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joint_isStatic - 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_Joint_release(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_Joint.h

@@ -79,6 +79,7 @@ int lua_Joint_getWorldMatrix(lua_State* state);
 int lua_Joint_getWorldViewMatrix(lua_State* state);
 int lua_Joint_getWorldViewProjectionMatrix(lua_State* state);
 int lua_Joint_hasTag(lua_State* state);
+int lua_Joint_isStatic(lua_State* state);
 int lua_Joint_release(lua_State* state);
 int lua_Joint_removeAllChildren(lua_State* state);
 int lua_Joint_removeChild(lua_State* state);

+ 942 - 166
gameplay/src/lua/lua_MaterialParameter.cpp

@@ -31,7 +31,20 @@ void luaRegister_MaterialParameter()
         {"getSampler", lua_MaterialParameter_getSampler},
         {"release", lua_MaterialParameter_release},
         {"setAnimationPropertyValue", lua_MaterialParameter_setAnimationPropertyValue},
+        {"setFloat", lua_MaterialParameter_setFloat},
+        {"setFloatArray", lua_MaterialParameter_setFloatArray},
+        {"setInt", lua_MaterialParameter_setInt},
+        {"setIntArray", lua_MaterialParameter_setIntArray},
+        {"setMatrix", lua_MaterialParameter_setMatrix},
+        {"setMatrixArray", lua_MaterialParameter_setMatrixArray},
+        {"setSampler", lua_MaterialParameter_setSampler},
         {"setValue", lua_MaterialParameter_setValue},
+        {"setVector2", lua_MaterialParameter_setVector2},
+        {"setVector2Array", lua_MaterialParameter_setVector2Array},
+        {"setVector3", lua_MaterialParameter_setVector3},
+        {"setVector3Array", lua_MaterialParameter_setVector3Array},
+        {"setVector4", lua_MaterialParameter_setVector4},
+        {"setVector4Array", lua_MaterialParameter_setVector4Array},
         {NULL, NULL}
     };
     const luaL_Reg lua_statics[] = 
@@ -969,6 +982,409 @@ int lua_MaterialParameter_setAnimationPropertyValue(lua_State* state)
     return 0;
 }
 
+int lua_MaterialParameter_setFloat(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_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setFloat(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setFloat - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setFloatArray(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param1 = gameplay::ScriptUtil::getFloatPointer(2);
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setFloatArray(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setFloatArray - 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_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param1 = gameplay::ScriptUtil::getFloatPointer(2);
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setFloatArray(param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setFloatArray - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setInt(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_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                int param1 = (int)luaL_checkint(state, 2);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setInt(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setInt - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setIntArray(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setIntArray(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setIntArray - 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_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setIntArray(param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setIntArray - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setMatrix(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.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Matrix'.");
+                    lua_error(state);
+                }
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setMatrix(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setMatrix - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setMatrixArray(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Matrix'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setMatrixArray(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setMatrixArray - 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_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Matrix'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setMatrixArray(param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setMatrixArray - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setSampler(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:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Texture::Sampler> param1 = gameplay::ScriptUtil::getObjectPointer<Texture::Sampler>(2, "TextureSampler", false, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setSampler(param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_MaterialParameter_setSampler - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TBOOLEAN)
+                {
+                    // Get parameter 1 off the stack.
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                    MaterialParameter* instance = getInstance(state);
+                    void* returnPtr = (void*)instance->setSampler(param1, param2);
+                    if (returnPtr)
+                    {
+                        gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                        object->instance = returnPtr;
+                        object->owns = false;
+                        luaL_getmetatable(state, "TextureSampler");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_MaterialParameter_setSampler - 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 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_MaterialParameter_setValue(lua_State* state)
 {
     // Get the number of parameters.
@@ -1027,13 +1443,139 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
+                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
+                {
+                    // Get parameter 1 off the stack.
+                    gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                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.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(*param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                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.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(*param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                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.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(*param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    MaterialParameter* instance = getInstance(state);
+                    instance->setValue(param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            do
+            {
+                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.
-                    gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
 
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1);
+                    instance->setValue(*param1);
                     
                     return 0;
                 }
@@ -1042,16 +1584,16 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                    gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, &param1Valid);
                     if (!param1Valid)
                         break;
 
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(*param1);
+                    instance->setValue(param1);
                     
                     return 0;
                 }
@@ -1064,7 +1606,7 @@ int lua_MaterialParameter_setValue(lua_State* state)
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
+                    gameplay::ScriptUtil::LuaArray<Texture::Sampler> param1 = gameplay::ScriptUtil::getObjectPointer<Texture::Sampler>(2, "TextureSampler", false, &param1Valid);
                     if (!param1Valid)
                         break;
 
@@ -1075,19 +1617,26 @@ int lua_MaterialParameter_setValue(lua_State* state)
                 }
             } while (0);
 
+            lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    gameplay::ScriptUtil::LuaArray<float> param1 = gameplay::ScriptUtil::getFloatPointer(2);
+
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(*param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1096,16 +1645,17 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1114,16 +1664,20 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
                     if (!param1Valid)
                         break;
 
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(*param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1132,16 +1686,20 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
+                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
                     if (!param1Valid)
                         break;
 
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1150,16 +1708,20 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true, &param1Valid);
+                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
                     if (!param1Valid)
                         break;
 
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(*param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1168,7 +1730,8 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER)
                 {
                     // Get parameter 1 off the stack.
                     bool param1Valid;
@@ -1176,8 +1739,11 @@ int lua_MaterialParameter_setValue(lua_State* state)
                     if (!param1Valid)
                         break;
 
+                    // Get parameter 2 off the stack.
+                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1);
+                    instance->setValue(param1, param2);
                     
                     return 0;
                 }
@@ -1186,18 +1752,31 @@ int lua_MaterialParameter_setValue(lua_State* state)
             do
             {
                 if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TBOOLEAN)
                 {
                     // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Texture::Sampler> param1 = gameplay::ScriptUtil::getObjectPointer<Texture::Sampler>(2, "TextureSampler", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
 
                     MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1);
-                    
-                    return 0;
+                    void* returnPtr = (void*)instance->setValue(param1, param2);
+                    if (returnPtr)
+                    {
+                        gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                        object->instance = returnPtr;
+                        object->owns = false;
+                        luaL_getmetatable(state, "TextureSampler");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
                 }
             } while (0);
 
@@ -1205,172 +1784,369 @@ int lua_MaterialParameter_setValue(lua_State* state)
             lua_error(state);
             break;
         }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setVector2(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.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector2(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setVector2 - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setVector2Array(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector2Array(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setVector2Array - 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_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector2Array(param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setVector2Array - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setVector3(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.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
+                    lua_error(state);
+                }
+
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector3(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_MaterialParameter_setVector3 - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_MaterialParameter_setVector3Array(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 3:
         {
-            do
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
             {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
+                if (!param1Valid)
                 {
-                    // Get parameter 1 off the stack.
-                    gameplay::ScriptUtil::LuaArray<float> param1 = gameplay::ScriptUtil::getFloatPointer(2);
-
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
-
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
+                    lua_error(state);
                 }
-            } while (0);
 
-            do
-            {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
-                {
-                    // Get parameter 1 off the stack.
-                    gameplay::ScriptUtil::LuaArray<int> param1 = gameplay::ScriptUtil::getIntPointer(2);
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector3Array(param1, param2);
 
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
-                }
-            } while (0);
+                return 0;
+            }
 
-            do
+            lua_pushstring(state, "lua_MaterialParameter_setVector3Array - 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_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
             {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
+                if (!param1Valid)
                 {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
+                    lua_error(state);
+                }
 
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
-                }
-            } while (0);
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
 
-            do
-            {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
-                {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector3Array(param1, param2, param3);
 
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+                return 0;
+            }
 
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
-                }
-            } while (0);
+            lua_pushstring(state, "lua_MaterialParameter_setVector3Array - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
 
-            do
+int lua_MaterialParameter_setVector4(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))
             {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
                 {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
 
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector4(*param1);
+                
+                return 0;
+            }
 
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
-                }
-            } while (0);
+            lua_pushstring(state, "lua_MaterialParameter_setVector4 - 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).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
 
-            do
+int lua_MaterialParameter_setVector4Array(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
             {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
-                    lua_type(state, 3) == LUA_TNUMBER)
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
+                if (!param1Valid)
                 {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Matrix> param1 = gameplay::ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
 
-                    // Get parameter 2 off the stack.
-                    unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
-                    MaterialParameter* instance = getInstance(state);
-                    instance->setValue(param1, param2);
-                    
-                    return 0;
-                }
-            } while (0);
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector4Array(param1, param2);
+                
+                return 0;
+            }
 
-            do
+            lua_pushstring(state, "lua_MaterialParameter_setVector4Array - 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_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
             {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
-                    lua_type(state, 3) == LUA_TBOOLEAN)
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", false, &param1Valid);
+                if (!param1Valid)
                 {
-                    // Get parameter 1 off the stack.
-                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
 
-                    // Get parameter 2 off the stack.
-                    bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
 
-                    MaterialParameter* instance = getInstance(state);
-                    void* returnPtr = (void*)instance->setValue(param1, param2);
-                    if (returnPtr)
-                    {
-                        gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
-                        object->instance = returnPtr;
-                        object->owns = false;
-                        luaL_getmetatable(state, "TextureSampler");
-                        lua_setmetatable(state, -2);
-                    }
-                    else
-                    {
-                        lua_pushnil(state);
-                    }
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
 
-                    return 1;
-                }
-            } while (0);
+                MaterialParameter* instance = getInstance(state);
+                instance->setVector4Array(param1, param2, param3);
+                
+                return 0;
+            }
 
-            lua_pushstring(state, "lua_MaterialParameter_setValue - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_MaterialParameter_setVector4Array - 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 3).");
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
             lua_error(state);
             break;
         }

+ 13 - 0
gameplay/src/lua/lua_MaterialParameter.h

@@ -20,7 +20,20 @@ int lua_MaterialParameter_getRefCount(lua_State* state);
 int lua_MaterialParameter_getSampler(lua_State* state);
 int lua_MaterialParameter_release(lua_State* state);
 int lua_MaterialParameter_setAnimationPropertyValue(lua_State* state);
+int lua_MaterialParameter_setFloat(lua_State* state);
+int lua_MaterialParameter_setFloatArray(lua_State* state);
+int lua_MaterialParameter_setInt(lua_State* state);
+int lua_MaterialParameter_setIntArray(lua_State* state);
+int lua_MaterialParameter_setMatrix(lua_State* state);
+int lua_MaterialParameter_setMatrixArray(lua_State* state);
+int lua_MaterialParameter_setSampler(lua_State* state);
 int lua_MaterialParameter_setValue(lua_State* state);
+int lua_MaterialParameter_setVector2(lua_State* state);
+int lua_MaterialParameter_setVector2Array(lua_State* state);
+int lua_MaterialParameter_setVector3(lua_State* state);
+int lua_MaterialParameter_setVector3Array(lua_State* state);
+int lua_MaterialParameter_setVector4(lua_State* state);
+int lua_MaterialParameter_setVector4Array(lua_State* state);
 int lua_MaterialParameter_static_ANIMATE_UNIFORM(lua_State* state);
 
 void luaRegister_MaterialParameter();

+ 36 - 0
gameplay/src/lua/lua_Node.cpp

@@ -102,6 +102,7 @@ void luaRegister_Node()
         {"getWorldViewMatrix", lua_Node_getWorldViewMatrix},
         {"getWorldViewProjectionMatrix", lua_Node_getWorldViewProjectionMatrix},
         {"hasTag", lua_Node_hasTag},
+        {"isStatic", lua_Node_isStatic},
         {"release", lua_Node_release},
         {"removeAllChildren", lua_Node_removeAllChildren},
         {"removeChild", lua_Node_removeChild},
@@ -3889,6 +3890,41 @@ int lua_Node_hasTag(lua_State* state)
     return 0;
 }
 
+int lua_Node_isStatic(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))
+            {
+                Node* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Node_isStatic - 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_Node_release(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_Node.h

@@ -78,6 +78,7 @@ int lua_Node_getWorldMatrix(lua_State* state);
 int lua_Node_getWorldViewMatrix(lua_State* state);
 int lua_Node_getWorldViewProjectionMatrix(lua_State* state);
 int lua_Node_hasTag(lua_State* state);
+int lua_Node_isStatic(lua_State* state);
 int lua_Node_release(lua_State* state);
 int lua_Node_removeAllChildren(lua_State* state);
 int lua_Node_removeChild(lua_State* state);

+ 36 - 0
gameplay/src/lua/lua_PhysicsCharacter.cpp

@@ -47,6 +47,7 @@ void luaRegister_PhysicsCharacter()
         {"isEnabled", lua_PhysicsCharacter_isEnabled},
         {"isKinematic", lua_PhysicsCharacter_isKinematic},
         {"isPhysicsEnabled", lua_PhysicsCharacter_isPhysicsEnabled},
+        {"isStatic", lua_PhysicsCharacter_isStatic},
         {"jump", lua_PhysicsCharacter_jump},
         {"removeCollisionListener", lua_PhysicsCharacter_removeCollisionListener},
         {"rotate", lua_PhysicsCharacter_rotate},
@@ -861,6 +862,41 @@ int lua_PhysicsCharacter_isPhysicsEnabled(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsCharacter_isStatic(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))
+            {
+                PhysicsCharacter* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_PhysicsCharacter_isStatic - 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_PhysicsCharacter_jump(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsCharacter.h

@@ -23,6 +23,7 @@ int lua_PhysicsCharacter_isDynamic(lua_State* state);
 int lua_PhysicsCharacter_isEnabled(lua_State* state);
 int lua_PhysicsCharacter_isKinematic(lua_State* state);
 int lua_PhysicsCharacter_isPhysicsEnabled(lua_State* state);
+int lua_PhysicsCharacter_isStatic(lua_State* state);
 int lua_PhysicsCharacter_jump(lua_State* state);
 int lua_PhysicsCharacter_removeCollisionListener(lua_State* state);
 int lua_PhysicsCharacter_rotate(lua_State* state);

+ 36 - 0
gameplay/src/lua/lua_PhysicsCollisionObject.cpp

@@ -37,6 +37,7 @@ void luaRegister_PhysicsCollisionObject()
         {"isDynamic", lua_PhysicsCollisionObject_isDynamic},
         {"isEnabled", lua_PhysicsCollisionObject_isEnabled},
         {"isKinematic", lua_PhysicsCollisionObject_isKinematic},
+        {"isStatic", lua_PhysicsCollisionObject_isStatic},
         {"removeCollisionListener", lua_PhysicsCollisionObject_removeCollisionListener},
         {"setEnabled", lua_PhysicsCollisionObject_setEnabled},
         {NULL, NULL}
@@ -730,6 +731,41 @@ int lua_PhysicsCollisionObject_isKinematic(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsCollisionObject_isStatic(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))
+            {
+                PhysicsCollisionObject* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_PhysicsCollisionObject_isStatic - 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_PhysicsCollisionObject_removeCollisionListener(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsCollisionObject.h

@@ -20,6 +20,7 @@ int lua_PhysicsCollisionObject_getType(lua_State* state);
 int lua_PhysicsCollisionObject_isDynamic(lua_State* state);
 int lua_PhysicsCollisionObject_isEnabled(lua_State* state);
 int lua_PhysicsCollisionObject_isKinematic(lua_State* state);
+int lua_PhysicsCollisionObject_isStatic(lua_State* state);
 int lua_PhysicsCollisionObject_removeCollisionListener(lua_State* state);
 int lua_PhysicsCollisionObject_setEnabled(lua_State* state);
 

+ 36 - 0
gameplay/src/lua/lua_PhysicsGhostObject.cpp

@@ -42,6 +42,7 @@ void luaRegister_PhysicsGhostObject()
         {"isDynamic", lua_PhysicsGhostObject_isDynamic},
         {"isEnabled", lua_PhysicsGhostObject_isEnabled},
         {"isKinematic", lua_PhysicsGhostObject_isKinematic},
+        {"isStatic", lua_PhysicsGhostObject_isStatic},
         {"removeCollisionListener", lua_PhysicsGhostObject_removeCollisionListener},
         {"setEnabled", lua_PhysicsGhostObject_setEnabled},
         {"transformChanged", lua_PhysicsGhostObject_transformChanged},
@@ -698,6 +699,41 @@ int lua_PhysicsGhostObject_isKinematic(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsGhostObject_isStatic(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))
+            {
+                PhysicsGhostObject* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_PhysicsGhostObject_isStatic - 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_PhysicsGhostObject_removeCollisionListener(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsGhostObject.h

@@ -19,6 +19,7 @@ int lua_PhysicsGhostObject_getType(lua_State* state);
 int lua_PhysicsGhostObject_isDynamic(lua_State* state);
 int lua_PhysicsGhostObject_isEnabled(lua_State* state);
 int lua_PhysicsGhostObject_isKinematic(lua_State* state);
+int lua_PhysicsGhostObject_isStatic(lua_State* state);
 int lua_PhysicsGhostObject_removeCollisionListener(lua_State* state);
 int lua_PhysicsGhostObject_setEnabled(lua_State* state);
 int lua_PhysicsGhostObject_transformChanged(lua_State* state);

+ 36 - 0
gameplay/src/lua/lua_PhysicsVehicle.cpp

@@ -56,6 +56,7 @@ void luaRegister_PhysicsVehicle()
         {"isDynamic", lua_PhysicsVehicle_isDynamic},
         {"isEnabled", lua_PhysicsVehicle_isEnabled},
         {"isKinematic", lua_PhysicsVehicle_isKinematic},
+        {"isStatic", lua_PhysicsVehicle_isStatic},
         {"removeCollisionListener", lua_PhysicsVehicle_removeCollisionListener},
         {"reset", lua_PhysicsVehicle_reset},
         {"setBoost", lua_PhysicsVehicle_setBoost},
@@ -1380,6 +1381,41 @@ int lua_PhysicsVehicle_isKinematic(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsVehicle_isStatic(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))
+            {
+                PhysicsVehicle* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_PhysicsVehicle_isStatic - 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_PhysicsVehicle_removeCollisionListener(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsVehicle.h

@@ -37,6 +37,7 @@ int lua_PhysicsVehicle_getWheel(lua_State* state);
 int lua_PhysicsVehicle_isDynamic(lua_State* state);
 int lua_PhysicsVehicle_isEnabled(lua_State* state);
 int lua_PhysicsVehicle_isKinematic(lua_State* state);
+int lua_PhysicsVehicle_isStatic(lua_State* state);
 int lua_PhysicsVehicle_removeCollisionListener(lua_State* state);
 int lua_PhysicsVehicle_reset(lua_State* state);
 int lua_PhysicsVehicle_setBoost(lua_State* state);

+ 36 - 0
gameplay/src/lua/lua_PhysicsVehicleWheel.cpp

@@ -49,6 +49,7 @@ void luaRegister_PhysicsVehicleWheel()
         {"isDynamic", lua_PhysicsVehicleWheel_isDynamic},
         {"isEnabled", lua_PhysicsVehicleWheel_isEnabled},
         {"isKinematic", lua_PhysicsVehicleWheel_isKinematic},
+        {"isStatic", lua_PhysicsVehicleWheel_isStatic},
         {"isSteerable", lua_PhysicsVehicleWheel_isSteerable},
         {"removeCollisionListener", lua_PhysicsVehicleWheel_removeCollisionListener},
         {"setEnabled", lua_PhysicsVehicleWheel_setEnabled},
@@ -1160,6 +1161,41 @@ int lua_PhysicsVehicleWheel_isKinematic(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsVehicleWheel_isStatic(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))
+            {
+                PhysicsVehicleWheel* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_PhysicsVehicleWheel_isStatic - 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_PhysicsVehicleWheel_isSteerable(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsVehicleWheel.h

@@ -31,6 +31,7 @@ int lua_PhysicsVehicleWheel_getWheelRadius(lua_State* state);
 int lua_PhysicsVehicleWheel_isDynamic(lua_State* state);
 int lua_PhysicsVehicleWheel_isEnabled(lua_State* state);
 int lua_PhysicsVehicleWheel_isKinematic(lua_State* state);
+int lua_PhysicsVehicleWheel_isStatic(lua_State* state);
 int lua_PhysicsVehicleWheel_isSteerable(lua_State* state);
 int lua_PhysicsVehicleWheel_removeCollisionListener(lua_State* state);
 int lua_PhysicsVehicleWheel_setEnabled(lua_State* state);

+ 30 - 1
gameplay/src/lua/lua_Platform.cpp

@@ -17,7 +17,11 @@ void luaRegister_Platform()
         {"enterMessagePump", lua_Platform_enterMessagePump},
         {NULL, NULL}
     };
-    const luaL_Reg* lua_statics = NULL;
+    const luaL_Reg lua_statics[] = 
+    {
+        {"swapBuffers", lua_Platform_static_swapBuffers},
+        {NULL, NULL}
+    };
     std::vector<std::string> scopePath;
 
     gameplay::ScriptUtil::registerClass("Platform", lua_members, NULL, lua_Platform__gc, lua_statics, scopePath);
@@ -103,4 +107,29 @@ int lua_Platform_enterMessagePump(lua_State* state)
     return 0;
 }
 
+int lua_Platform_static_swapBuffers(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 0:
+        {
+            Platform::swapBuffers();
+            
+            return 0;
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 0).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 }

+ 1 - 0
gameplay/src/lua/lua_Platform.h

@@ -7,6 +7,7 @@ namespace gameplay
 // Lua bindings for Platform.
 int lua_Platform__gc(lua_State* state);
 int lua_Platform_enterMessagePump(lua_State* state);
+int lua_Platform_static_swapBuffers(lua_State* state);
 
 void luaRegister_Platform();
 

+ 36 - 0
gameplay/src/lua/lua_Transform.cpp

@@ -43,6 +43,7 @@ void luaRegister_Transform()
         {"getTranslationY", lua_Transform_getTranslationY},
         {"getTranslationZ", lua_Transform_getTranslationZ},
         {"getUpVector", lua_Transform_getUpVector},
+        {"isStatic", lua_Transform_isStatic},
         {"removeListener", lua_Transform_removeListener},
         {"removeScriptCallback", lua_Transform_removeScriptCallback},
         {"rotate", lua_Transform_rotate},
@@ -1899,6 +1900,41 @@ int lua_Transform_getUpVector(lua_State* state)
     return 0;
 }
 
+int lua_Transform_isStatic(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))
+            {
+                Transform* instance = getInstance(state);
+                bool result = instance->isStatic();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Transform_isStatic - 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_Transform_removeListener(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_Transform.h

@@ -32,6 +32,7 @@ int lua_Transform_getTranslationX(lua_State* state);
 int lua_Transform_getTranslationY(lua_State* state);
 int lua_Transform_getTranslationZ(lua_State* state);
 int lua_Transform_getUpVector(lua_State* state);
+int lua_Transform_isStatic(lua_State* state);
 int lua_Transform_removeListener(lua_State* state);
 int lua_Transform_removeScriptCallback(lua_State* state);
 int lua_Transform_rotate(lua_State* state);