creates an orthographic projection matrix * Creates an orthographic projection matrix. * This is useful to construct a projection matrix for a camera or rendering in general. * * @name vmath.matrix4_orthographic * @param left [type:number] coordinate for left clipping plane * @param right [type:number] coordinate for right clipping plane * @param bottom [type:num
| 1535 | * ``` |
| 1536 | */ |
| 1537 | static int Matrix4_Orthographic(lua_State* L) |
| 1538 | { |
| 1539 | float left = (float) luaL_checknumber(L, 1); |
| 1540 | float right = (float) luaL_checknumber(L, 2); |
| 1541 | float bottom = (float) luaL_checknumber(L, 3); |
| 1542 | float top = (float) luaL_checknumber(L, 4); |
| 1543 | float near_z = (float) luaL_checknumber(L, 5); |
| 1544 | float far_z = (float) luaL_checknumber(L, 6); |
| 1545 | PushMatrix4(L, Matrix4::orthographic(left, right, bottom, top, near_z, far_z)); |
| 1546 | return 1; |
| 1547 | } |
| 1548 | |
| 1549 | /*# creates a perspective projection matrix |
| 1550 | * Creates a perspective projection matrix. |
nothing calls this directly
no test coverage detected