forked from jvan/pyvrui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrui.i
148 lines (112 loc) · 4.84 KB
/
vrui.i
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
%{
#include <Vrui/Application.h>
#include <Vrui/Vrui.h>
#include <Vrui/Tool.h>
#include <Vrui/ToolManager.h>
#include <Vrui/LocatorTool.h>
#include <Vrui/InputDeviceFeature.h>
#include <Vrui/ToolInputAssignment.h>
#include <Misc/ConfigurationFile.h>
#include <Misc/FunctionCalls.h>
%}
%import <Vrui/Geometry.h>
%template(PluginsFactoryManager) Plugins::FactoryManager<Vrui::ToolFactory>;
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Vrui::ToolInputAssignment::Slot;
%include <Vrui/ToolInputAssignment.h>
//------------------------------------------------------------------------------
// Vrui::Tool Class Interface
//
//------------------------------------------------------------------------------
%ignore Vrui::Tool::getFactory;
%feature("director") Vrui::Tool;
%include <Vrui/Tool.h>
//------------------------------------------------------------------------------
// Vrui::ToolManager Class Interface
//
//------------------------------------------------------------------------------
%ignore Vrui::ToolManager::addClass;
%ignore Vrui::ToolManager::addAbstractClass;
%ignore Vrui::ToolManager::releaseClass;
NESTED_CALLBACK_DATA_HELPER(Vrui, ToolManager, ToolCreationCallbackData);
NESTED_CALLBACK_DATA_HELPER(Vrui, ToolManager, ToolDestructionCallbackData);
%include <Vrui/ToolManager.h>
class ToolManagerToolCreationCallbackData : public Misc::CallbackData
{
public:
Vrui::Tool* tool;
Misc::ConfigurationFileSection* cfg;
ToolManagerToolCreationCallbackData(Vrui::Tool* tool, Misc::ConfigurationFileSection* cfg);
};
class ToolManagerToolDestructionCallbackData : public Misc::CallbackData
{
public:
Vrui::Tool* tool;
ToolManagerToolDestructionCallbackData(Vrui::Tool* tool);
};
%pythoncode %{
ToolManager.ToolCreationCallback = Callback('ToolManagerToolCreation')
ToolManager.ToolDestructionCallback = Callback('ToolManagerToolDestruction')
%}
//------------------------------------------------------------------------------
// Vrui::LocatorTool Class Interface
//
//------------------------------------------------------------------------------
NESTED_CALLBACK_DATA_HELPER(Vrui, LocatorTool, ButtonPressCallbackData);
NESTED_CALLBACK_DATA_HELPER(Vrui, LocatorTool, ButtonReleaseCallbackData);
NESTED_CALLBACK_DATA_HELPER(Vrui, LocatorTool, MotionCallbackData);
%include <Vrui/LocatorTool.h>
class LocatorToolButtonPressCallbackData : public Misc::CallbackData
{
public:
Vrui::LocatorTool* tool;
const Vrui::NavTrackerState& currentTransformation;
LocatorToolButtonPressCallbackData(Vrui::LocatorTool* sTool,const Vrui::NavTrackerState& sCurrentTransformation);
};
class LocatorToolButtonReleaseCallbackData : public Misc::CallbackData
{
public:
Vrui::LocatorTool* tool;
const Vrui::NavTrackerState& currentTransformation;
LocatorToolButtonReleaseCallbackData(Vrui::LocatorTool* sTool,const Vrui::NavTrackerState& sCurrentTransformation);
};
class LocatorToolMotionCallbackData : public Misc::CallbackData
{
public:
Vrui::LocatorTool* tool;
const Vrui::NavTrackerState& currentTransformation;
LocatorToolMotionCallbackData(Vrui::LocatorTool* sTool,const Vrui::NavTrackerState& sCurrentTransformation);
};
%pythoncode %{
LocatorTool.ButtonPressCallback = Callback('LocatorToolButtonPress')
LocatorTool.ButtonReleaseCallback = Callback('LocatorToolButtonRelease')
LocatorTool.MotionCallback = Callback('LocatorToolMotion')
%}
//------------------------------------------------------------------------------
// Vrui::Application Class Interface
//
//------------------------------------------------------------------------------
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Vrui::Application::Tool;
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Vrui::Application::ToolBase;
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Vrui::Application::EventTool;
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Vrui::Application::EventToolFactory;
%ignore Vrui::Application::Application(int&, char**&, char**&);
%ignore Vrui::Application::toolCreationCallback(ToolManager::ToolCreationCallbackData* cbData);
%ignore Vrui::Application::toolDestructionCallback(ToolManager::ToolDestructionCallbackData* cbData);
%feature("director") Vrui::Application;
%include <Vrui/Application.h>
//------------------------------------------------------------------------------
// Vrui.h Function Interface
//
//------------------------------------------------------------------------------
namespace Vrui {
GLMotif::WidgetManager* getWidgetManager(void);
void setMainMenu(GLMotif::PopupMenu* newMainMenu);
ToolManager* getToolManager(void);
double getApplicationTime(void);
double getFrameTime(void);
double getCurrentFrameTime(void);
void updateContinuously(void);
void requestUpdate(void);
void scheduleUpdate(double nextFrameTime);
void setNavigationTransformation(const Point& center,Scalar radius);
}