Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller_api.h @ 11524

Last change on this file since 11524 was 11519, checked in by kohlia, 7 years ago

See previous

File size: 1.3 KB
Line 
1#ifndef SCRIPTABLE_CONTROLLER_API_H
2#define SCRIPTABLE_CONTROLLER_API_H
3
4#include <functional>
5#include "core/CoreIncludes.h"
6
7// TODO Is pos int or double?
8
9struct lua_State;
10
11namespace orxonox
12{
13
14class ScriptableController;
15
16class ScriptableControllerAPI
17{
18public:
19    ScriptableControllerAPI(lua_State *lua, ScriptableController *controller);
20    ~ScriptableControllerAPI();
21
22    void testOutput(void);
23
24    void registerAfterTimeout(std::function<void (void)> callback, int timeout_ms);
25    int registerAtNearObject(std::function<void(int, int)> callback, int obj1, int obj2, double distance);
26    int registerAtAreaEnter(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz);
27    int registerAtAreaLeave(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz);
28    int registerAtObjectDestroyed(std::function<void (int)> callback, int obj);
29    int registerAtPickup(std::function<void (int)> callback, int pickup_id);
30
31    int destroyObject(int obj);
32    void removeObject(int obj);
33    int setObjectPosition(int obj, double x, double y, double z);
34
35    static ScriptableControllerAPI *this_;
36
37private:
38    lua_State *lua_;
39    ScriptableController *controller_;
40};
41
42}
43
44#endif // SCRIPTABLE_CONTROLLER_API_H
Note: See TracBrowser for help on using the repository browser.