naev 0.12.6
nlua_transform.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "mat4.h"
7#include "nlua.h"
8#include "opengl.h"
9
10#define TRANSFORM_METATABLE \
11 "transform"
13
14#define luaL_opttransform( L, ind, def ) \
15 nluaL_optarg( L, ind, def, luaL_checktransform )
16
17/*
18 * Library loading
19 */
20int nlua_loadTransform( nlua_env env );
21
22/*
23 * Transform operations
24 */
25mat4 *lua_totransform( lua_State *L, int ind );
26mat4 *luaL_checktransform( lua_State *L, int ind );
27mat4 *lua_pushtransform( lua_State *L, mat4 Transform );
28int lua_istransform( lua_State *L, int ind );
mat4 * lua_pushtransform(lua_State *L, mat4 transform)
Pushes a transform on the stack.
int lua_istransform(lua_State *L, int ind)
Checks to see if ind is a transform.
mat4 * luaL_checktransform(lua_State *L, int ind)
Gets transform at index or raises error if there is no transform at index.
mat4 * lua_totransform(lua_State *L, int ind)
Lua bindings to interact with transforms.
int nlua_loadTransform(nlua_env env)
Loads the transform library.
Definition mat4.h:12