sets the view matrix * * Sets the view matrix to use when rendering. * * @name render.set_view * @param matrix [type:matrix4] view matrix to set * @examples * * How to set the view and projection matrices according to * the values supplied by a camera. * * ```lua * function init(self) * self.view = vmath.matrix4() * self.pro
| 1901 | * ``` |
| 1902 | */ |
| 1903 | int RenderScript_SetView(lua_State* L) |
| 1904 | { |
| 1905 | RenderScriptInstance* i = RenderScriptInstance_Check(L); |
| 1906 | dmVMath::Matrix4 view = *dmScript::CheckMatrix4(L, 1); |
| 1907 | |
| 1908 | dmVMath::Matrix4* matrix = new dmVMath::Matrix4; |
| 1909 | *matrix = view; |
| 1910 | if (InsertCommand(i, Command(COMMAND_TYPE_SET_VIEW, (uint64_t)matrix))) |
| 1911 | return 0; |
| 1912 | else |
| 1913 | return luaL_error(L, "Command buffer is full (%d).", i->m_CommandBuffer.Capacity()); |
| 1914 | } |
| 1915 | |
| 1916 | /*# sets the projection matrix |
| 1917 | * Sets the projection matrix to use when rendering. |
nothing calls this directly
no test coverage detected