Math: Remove all Set(class) methods

This commit is contained in:
Lynix
2019-12-10 09:49:40 +01:00
parent ef030ddaac
commit be8e89b228
30 changed files with 19 additions and 234 deletions

View File

@@ -125,14 +125,14 @@ namespace Nz
state.Pop();
}
mat->Set(values);
*mat = Matrix4d(values);
return 1;
}
default:
{
if (state.IsOfType(index, "Matrix4"))
mat->Set(*static_cast<Matrix4d*>(state.ToUserdata(index)));
*mat = *static_cast<Matrix4d*>(state.ToUserdata(index));
return 1;
}

View File

@@ -282,7 +282,7 @@ namespace Ndk
{
case 1:
if (lua.IsOfType(argIndex, "Matrix4"))
instance.Set(*static_cast<Nz::Matrix4d*>(lua.ToUserdata(argIndex)));
instance = *static_cast<Nz::Matrix4d*>(lua.ToUserdata(argIndex));
break;
case 16:
@@ -291,7 +291,7 @@ namespace Ndk
for (std::size_t i = 0; i < 16; ++i)
values[i] = lua.CheckNumber(argIndex++);
instance.Set(values);
instance = Nz::Matrix4d(values);
return 0;
}