Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
l_vmanip.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
4
5#pragma once
6
7#include "irr_v3d.h"
8#include "lua_api/l_base.h"
9
10class Map;
11class MapBlock;
12class MMVManip;
13
14/*
15 VoxelManip
16 */
18{
19private:
20 bool is_mapgen_vm = false;
21
22 static const luaL_Reg methods[];
23
24 static int gc_object(lua_State *L);
25
26 static int l_read_from_map(lua_State *L);
27 static int l_get_data(lua_State *L);
28 static int l_set_data(lua_State *L);
29 static int l_write_to_map(lua_State *L);
30
31 static int l_get_node_at(lua_State *L);
32 static int l_set_node_at(lua_State *L);
33
34 static int l_update_map(lua_State *L);
35 static int l_update_liquids(lua_State *L);
36
37 static int l_calc_lighting(lua_State *L);
38 static int l_set_lighting(lua_State *L);
39 static int l_get_light_data(lua_State *L);
40 static int l_set_light_data(lua_State *L);
41
42 static int l_get_param2_data(lua_State *L);
43 static int l_set_param2_data(lua_State *L);
44
45 static int l_was_modified(lua_State *L);
46 static int l_get_emerged_area(lua_State *L);
47
48public:
49 MMVManip *vm = nullptr;
50
52 LuaVoxelManip(Map *map);
54
55 // LuaVoxelManip()
56 // Creates a LuaVoxelManip and leaves it on top of stack
57 static int create_object(lua_State *L);
58 // Not callable from Lua
59 static void create(lua_State *L, MMVManip *mmvm, bool is_mapgen_vm);
60
61 static void *packIn(lua_State *L, int idx);
62 static void packOut(lua_State *L, void *ptr);
63
64 static void Register(lua_State *L);
65
66 static const char className[];
67};
Definition l_vmanip.h:18
static int l_was_modified(lua_State *L)
Definition l_vmanip.cpp:320
static int l_set_light_data(lua_State *L)
Definition l_vmanip.cpp:242
static int l_get_param2_data(lua_State *L)
Definition l_vmanip.cpp:266
LuaVoxelManip(MMVManip *mmvm, bool is_mapgen_vm)
Definition l_vmanip.cpp:347
MMVManip * vm
Definition l_vmanip.h:49
static int l_set_node_at(lua_State *L)
Definition l_vmanip.cpp:147
static int l_set_lighting(lua_State *L)
Definition l_vmanip.cpp:189
static int l_update_map(lua_State *L)
Definition l_vmanip.cpp:315
static int l_get_emerged_area(lua_State *L)
Definition l_vmanip.cpp:335
static int l_write_to_map(lua_State *L)
Definition l_vmanip.cpp:105
bool is_mapgen_vm
Definition l_vmanip.h:20
static int l_get_node_at(lua_State *L)
Definition l_vmanip.cpp:136
static const char className[]
Definition l_vmanip.h:66
~LuaVoxelManip()
Definition l_vmanip.cpp:357
static int l_set_param2_data(lua_State *L)
Definition l_vmanip.cpp:291
static int gc_object(lua_State *L)
Definition l_vmanip.cpp:19
static int l_set_data(lua_State *L)
Definition l_vmanip.cpp:76
static int l_update_liquids(lua_State *L)
Definition l_vmanip.cpp:159
static int l_get_data(lua_State *L)
Definition l_vmanip.cpp:51
static void * packIn(lua_State *L, int idx)
Definition l_vmanip.cpp:397
static int l_get_light_data(lua_State *L)
Definition l_vmanip.cpp:217
static int l_read_from_map(lua_State *L)
Definition l_vmanip.cpp:27
static void create(lua_State *L, MMVManip *mmvm, bool is_mapgen_vm)
Definition l_vmanip.cpp:389
static int create_object(lua_State *L)
Definition l_vmanip.cpp:365
static const luaL_Reg methods[]
Definition l_vmanip.h:437
static int l_calc_lighting(lua_State *L)
Definition l_vmanip.cpp:166
static void packOut(lua_State *L, void *ptr)
Definition l_vmanip.cpp:406
Definition map.h:305
Definition mapblock.h:58
Definition map.h:101
Definition l_base.h:28
#define idx(x, y)
Definition noise.cpp:490