Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
l_camera.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013-2017 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include "l_base.h"
8
9class Camera;
10
11class LuaCamera : public ModApiBase
12{
13private:
14 static const luaL_Reg methods[];
15
16 // garbage collector
17 static int gc_object(lua_State *L);
18
19 static int l_set_camera_mode(lua_State *L);
20 static int l_get_camera_mode(lua_State *L);
21
22 static int l_get_fov(lua_State *L);
23
24 static int l_get_pos(lua_State *L);
25 static int l_get_offset(lua_State *L);
26 static int l_get_look_dir(lua_State *L);
27 static int l_get_look_vertical(lua_State *L);
28 static int l_get_look_horizontal(lua_State *L);
29 static int l_get_aspect_ratio(lua_State *L);
30
31 static Camera *getobject(LuaCamera *ref);
32 static Camera *getobject(lua_State *L, int narg);
33
34 Camera *m_camera = nullptr;
35
36public:
37 LuaCamera(Camera *m);
38 ~LuaCamera() = default;
39
40 static void create(lua_State *L, Camera *m);
41
42 static void Register(lua_State *L);
43
44 static const char className[];
45};
Definition camera.h:68
Definition l_camera.h:12
static int l_get_look_dir(lua_State *L)
Definition l_camera.cpp:110
static int l_get_look_vertical(lua_State *L)
Definition l_camera.cpp:133
static int l_set_camera_mode(lua_State *L)
Definition l_camera.cpp:40
LuaCamera(Camera *m)
Definition l_camera.cpp:13
static int gc_object(lua_State *L)
Definition l_camera.cpp:165
static int l_get_aspect_ratio(lua_State *L)
Definition l_camera.cpp:143
~LuaCamera()=default
static int l_get_pos(lua_State *L)
Definition l_camera.cpp:89
static const luaL_Reg methods[]
Definition l_camera.h:182
static const char className[]
Definition l_camera.h:44
static int l_get_offset(lua_State *L)
Definition l_camera.cpp:100
static void create(lua_State *L, Camera *m)
Definition l_camera.cpp:17
static int l_get_fov(lua_State *L)
Definition l_camera.cpp:70
Camera * m_camera
Definition l_camera.h:34
static int l_get_camera_mode(lua_State *L)
Definition l_camera.cpp:58
static int l_get_look_horizontal(lua_State *L)
Definition l_camera.cpp:122
static Camera * getobject(LuaCamera *ref)
Definition l_camera.cpp:153
Definition l_base.h:28