-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdmath_lua.h
More file actions
64 lines (45 loc) · 1.15 KB
/
stdmath_lua.h
File metadata and controls
64 lines (45 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Copyright (c) 2015 Milovann Yanatchkov
*
* This file is part of Mud, a free software
* licensed under the GNU General Public License v2
* see /LICENSE for more information
*
*/
#ifndef __STD_MATH_LUA_H__
#define __STD_MATH_LUA_H__
// ==========================================================
// VECTORS
// ==========================================================
#define L_VECTOR "L_VECTOR"
#define VEC_X 1
#define VEC_Y 2
#define VEC_Z 3
struct MN_Vector;
struct MN_MAT4;
struct MN_MAT3;
typedef struct Lua_Vector
{
struct MN_Vector *v;
}t_lua_vector;
// STDMATH
void lua_stdmath_register( struct lua_State *L);
// ==========================================================
// MAT4
// ==========================================================
#define L_MAT4 "L_MAT4"
typedef struct Lua_Mat4
{
struct MN_MAT4 *m;
}t_lua_mat4;
t_lua_mat4 *lua_mat4_check( lua_State *L, int index);
void lua_mat4_register( lua_State *L);
// ==========================================================
// MAT3
// ==========================================================
#define L_MAT3 "L_MAT3"
typedef struct Lua_Mat3
{
struct MN_MAT3 *m;
}t_lua_mat3;
#endif