MCPcopy Create free account
hub / github.com/DavidColson/Polybox / LuaLoadMatrix

Function LuaLoadMatrix

source/bind_graphics.cpp:151–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149// ***********************************************************************
150
151int LuaLoadMatrix(lua_State* pLua) {
152 UserData* pUserData = (UserData*)luaL_checkudata(pLua, 1, "UserData");
153 if (pUserData->type != Type::Float32 || pUserData->width != 4 || pUserData->height != 4) {
154 luaL_error(pLua, "Invalid matrix provided, need to be f32 type 4x4 matrix");
155 return 0;
156 }
157 Matrixf mat;
158 memcpy(mat.m, pUserData->pData, 16*sizeof(f32));
159 LoadMatrix(mat);
160 return 0;
161}
162
163// ***********************************************************************
164

Callers

nothing calls this directly

Calls 1

LoadMatrixFunction · 0.85

Tested by

no test coverage detected