naev 0.11.5
nlua_transform.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "opengl.h"
8#include "mat4.h"
9
10#define TRANSFORM_METATABLE "transform"
12#define luaL_opttransform(L,ind,def) nluaL_optarg(L,ind,def,luaL_checktransform)
13
14/*
15 * Library loading
16 */
17int nlua_loadTransform( nlua_env env );
18
19/*
20 * Transform operations
21 */
22mat4* lua_totransform( lua_State *L, int ind );
23mat4* luaL_checktransform( lua_State *L, int ind );
24mat4* lua_pushtransform( lua_State *L, mat4 Transform );
25int 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:10