This repository was archived by the owner on Jul 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirtualPlane.py
More file actions
212 lines (148 loc) · 5.19 KB
/
virtualPlane.py
File metadata and controls
212 lines (148 loc) · 5.19 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
"""
This module was generated by Vizconnect.
Version: 1.02
Generated on: 2015-05-27 16:24:41.857000
"""
import viz
import vizconnect
#################################
# Parent configuration, if any
#################################
def getParentConfiguration():
#VC: set the parent configuration
_parent = ''
#VC: return the parent configuration
return _parent
#################################
# Pre viz.go() Code
#################################
def preVizGo():
return True
#################################
# Pre-initialization Code
#################################
def preInit():
"""Add any code here which should be called after viz.go but before any initializations happen.
Returned values can be obtained by calling getPreInitResult for this file's vizconnect.Configuration instance."""
return None
#################################
# Group Code
#################################
def initGroups(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawGroup = vizconnect.getRawGroupDict()
#VC: return values can be modified here
return None
#################################
# Display Code
#################################
def initDisplays(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawDisplay = vizconnect.getRawDisplayDict()
#VC: initialize a new display
_name = 'projector'
if vizconnect.isPendingInit('display', _name, initFlag, initList):
#VC: init which needs to happen before viz.go
if initFlag&vizconnect.INIT_PREVIZGO:
viz.setOption('viz.stereo', viz.QUAD_BUFFER)
#VC: init the raw object
if initFlag&vizconnect.INIT_RAW:
#VC: set the window for the display
_window = viz.MainWindow
#VC: set the fullscreen monitor
viz.window.setFullscreenMonitor(3)
viz.window.setFullscreen(True)
#VC: set some parameters
VFOV = 60
aspect = viz.AUTO_COMPUTE
stereo = viz.QUAD_BUFFER
#VC: create the raw object
_window.fov(VFOV,aspect)
_window.stereo(stereo)
rawDisplay[_name] = _window
#VC: init the wrapper (DO NOT EDIT)
if initFlag&vizconnect.INIT_WRAPPERS:
vizconnect.addDisplay(rawDisplay[_name], _name, make='Generic', model='Custom Window')
#VC: return values can be modified here
return None
#################################
# Tracker Code
#################################
def initTrackers(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawTracker = vizconnect.getRawTrackerDict()
#VC: return values can be modified here
return None
#################################
# Input Code
#################################
def initInputs(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawInput = vizconnect.getRawInputDict()
#VC: return values can be modified here
return None
#################################
# Event Code
#################################
def initEvents(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawEvent = vizconnect.getRawEventDict()
#VC: return values can be modified here
return None
#################################
# Transport Code
#################################
def initTransports(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawTransport = vizconnect.getRawTransportDict()
#VC: return values can be modified here
return None
#################################
# Tool Code
#################################
def initTools(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawTool = vizconnect.getRawToolDict()
#VC: return values can be modified here
return None
#################################
# Avatar Code
#################################
def initAvatars(initFlag=vizconnect.INIT_INDEPENDENT, initList=None):
#VC: place any general initialization code here
rawAvatar = vizconnect.getRawAvatarDict()
#VC: return values can be modified here
return None
#################################
# Application Settings
#################################
def initSettings():
#VC: apply general application settings
viz.mouse.setTrap(False)
viz.mouse.setVisible(viz.MOUSE_AUTO_HIDE)
vizconnect.setMouseTrapToggleKey('')
#VC: return values can be modified here
return None
#################################
# Post-initialization Code
#################################
def postInit():
"""Add any code here which should be called after all of the initialization of this configuration is complete.
Returned values can be obtained by calling getPostInitResult for this file's vizconnect.Configuration instance."""
return None
#################################
# Stand alone configuration
#################################
def initInterface():
#VC: start the interface
vizconnect.interface.go(__file__,
live=True,
openBrowserWindow=True,
startingInterface=vizconnect.interface.INTERFACE_STARTUP)
#VC: return values can be modified here
return None
###############################################
if __name__ == "__main__":
initInterface()
viz.add('piazza.osgb')
viz.add('piazza_animations.osgb')