本文整理汇总了Python中viz.go函数的典型用法代码示例。如果您正苦于以下问题:Python go函数的具体用法?Python go怎么用?Python go使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了go函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
def main():
global loc_list
global active_location
loc_list = []
mainSceneWindow = None
cameraWindow = None
cameraWindowView = None
cam = None
pause_screen = None
nunchuck_disconnect_screen = None
message_screen = None
wiimote = None
nunchuck_wiimote = None
should_it_run = None
mainSceneWindow, cameraWindow, cameraWindowView, cam, pause_screen, nunchuck_disconnect_screen, message_screen, wiimote, nunchuck_wiimote, should_it_run = init_settings(mainSceneWindow, cameraWindow, cameraWindowView, cam, pause_screen, nunchuck_disconnect_screen, message_screen, wiimote, nunchuck_wiimote, should_it_run)
vizact.ontimer(0, moveCamera, nunchuck_wiimote, should_it_run)
viz.callback(wii.EXT_CONNECT_EVENT,onConnect)
viz.callback(wii.EXT_DISCONNECT_EVENT,onDisconnect)
initializer(loc_list)
arMarkerLoader(cam)
wiimoteInitializer(wiimote, nunchuck_wiimote, should_it_run, message_screen)
viz.go() # Inicia VIZ
for item in loc_list:
if item.space_name == "piazza.osgb":
active_location = item
item.addLocation()
示例2: setup_world
def setup_world(self):
viz.setOption('viz.fullscreen.monitor', 1)
#viz.setOption('viz.window.width', 2560)
#viz.setOption('viz.window.height', 1040)
#viz.setMultiSample(4)
#viz.MainWindow.clip(0.01, 500)
#viz.vsync(1)
vizconfig.register(nvis.nvisorSX111())
viz.go(viz.FULLSCREEN)
示例3: main
def main():
global TRACKER
viz.go(0)
# configure the phasespace.
mocap = vrlab.Phasespace('192.168.1.230', freq=100., postprocess=True)
mocap.start_thread()
TRACKER = mocap.track_points(M)
viztask.schedule(workflow)
示例4: go
def go(self):
"""Use this command to start the application."""
if self.__cave_mode:
viz.go(viz.STEREO | viz.FULLSCREEN)
else:
viz.go(viz.FULLSCREEN)
viz.mouse.setOverride(viz.ON)
self.callback(viz.UPDATE_EVENT,self.__onUpdate)
示例5: main
def main():
viz.vsync(viz.ON)
viz.window.setFullscreenMonitor([2])
viz.setMultiSample(4)
viz.MainWindow.clip(0.01, 200)
viz.go(viz.FULLSCREEN)
environment = viz.addChild("piazza.osgb")
environment.setPosition(2.75, 0, -0.75)
mocap = phasespace.Phasespace()
head = mocap.get_rigidTracker("hmd")
# DOES NOT ACCOUNT FOR RIGID BODY OFFSET DURING RESET
# mocap.track_rigid('Resources/hmd-nvisMount.rb', center_markers=(1,2))
head.link_pose(viz.MainView)
# glove = mocap.track_points([8, 9, 10])
paddle = mocap.track_rigid({17: (0, 0, 1), 19: (0, 0, 0), 20: (1, 0, 0), 22: (0, 1, 0)})
mocap.start_thread()
# mocap.start_timer()
def log_mocap(timer_id):
# print 'glove#9 pos {0[1]:.2f} {0[1]:.2f} {0[2]:.2f}'.format(*glove.get_marker(9))
print "head pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}".format(
*head.get_pose()
)
print "main " + str(viz.MainView.getPosition())
# print 'paddle pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*paddle.get_pose())
viz.callback(viz.TIMER_EVENT, log_mocap)
viz.starttimer(0, 1, viz.FOREVER)
def keydown(key):
if key == "h":
head.reset()
if key == "H":
head.save()
elif key == "1":
print "Marker Pos: " + str(mocap.get_MarkerPos(1))
viz.callback(viz.KEYDOWN_EVENT, keydown)
示例6: __init__
def __init__(self):
viz.go(viz.FULLSCREEN |viz.QUAD_BUFFER)
viz.window.setFullscreen(1)
#####################
#setup CAVE
polyMode = viz.POLY_WIRE
#viz.setFarPlane(1)
#viz.setMultiSample(4) #didn't observe a difference in landscapes with anti-aliasing.
viz.window.setPolyMode(viz.POLY_WIRE)
viz.vsync(viz.ON)#this may increase frame rate but may get tears
viz.ipd(0.2) #20 cm apart eyes seemed right for our scaling.
self.cave = vizcave.Cave()
示例7: __setupVizParams__
def __setupVizParams__(self):
#Just playing here#
#viz.setMultiSample(8)
#viz.fov(120)
#Check monitor refresh rate and set stereo mode accordingly#
monitor_RefreshRate = viz.getOption('viz.monitor.refresh_rate', type=int)
#if(119 <= monitor_RefreshRate):
#Turn on the physics engine
viz.phys.enable()
viz.window.setFullscreenMonitor(2)
viz.setMultiSample(8)
viz.go(viz.FULLSCREEN | viz.QUAD_BUFFER)
print "here"
示例8: InitHMD
def InitHMD():
global collisionLimbBoxes
if(USE_HMD):
pptExtension.setup();
viz.go(viz.FULLSCREEN)
viz.clip(0.1)
vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
if(len(collisionLimbBoxes) > 0):
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes);
else:
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None);
else:
pptSimulation.setup(avatar);
viz.clip(0.1)
viz.go(viz.FULLSCREEN);
vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
示例9: InitHMD
def InitHMD():
#BL:start
global collisionLimbBoxes
# if USE_HMD:
pptextension.setup()
if some_global_variables.headTrackingActive:
viz.go(viz.HMD | viz.TRACKER)
else:
viz.go()
viz.window.setSize(1260, 950)
#viz.go(viz.FULLSCREEN)
#BL:end
viz.clip(0.1)
vizact.onupdate(0, pptextension.pptUpdate, some_global_variables.avatar, some_global_variables.ghostAvatar, collisionLimbBoxes);
if(len(collisionLimbBoxes) > 0):
vizact.ontimer(1, pptextension.refreshAvatar, some_global_variables.ghostAvatar, some_global_variables.avatar, collisionLimbBoxes);
else:
vizact.ontimer(1, pptextension.refreshAvatar, some_global_variables.ghostAvatar, some_global_variables.avatar, None);
示例10: main
def main():
viz.setOption('viz.fullscreen.monitor', 1)
viz.setOption('viz.window.width', 2 * 640)
viz.setOption('viz.window.height', 480)
viz.setMultiSample(4)
viz.MainWindow.clip(0.01, 500)
vizconfig.register(nvis.nvisorSX111())
viz.go(viz.FULLSCREEN)
piazza = viz.addChild('piazza.osgb')
mocap = phasespace.Mocap('192.168.1.230')
head = mocap.track_rigid('Resources/hmd-nvis.rb', center_markers=(0, 5))
head.link_pose(viz.MainView)
glove = mocap.track_points([8, 9, 10])
paddle = mocap.track_rigid({
17:(0, 0, 1),
19:(0, 0, 0),
20:(1, 0, 0),
22:(0, 1, 0),
})
mocap.start_thread()
#mocap.start_timer()
def log_mocap(timer_id):
print 'glove#9 pos {0[1]:.2f} {0[1]:.2f} {0[2]:.2f}'.format(*glove.get_marker(9))
print 'head pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*head.get_pose())
print 'paddle pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*paddle.get_pose())
viz.callback(viz.TIMER_EVENT, log_mocap)
viz.starttimer(0, 1, viz.FOREVER)
def keydown(*args):
head.reset()
paddle.reset()
viz.callback(viz.KEYDOWN_EVENT, keydown)
示例11: InitHMD
def InitHMD():
global collisionLimbBoxes
if(USE_HMD):
#BL:start
viz.go(viz.HMD | viz.TRACKER)
viz.window.setSize(1260, 950)
pptExtension.setup();
#viz.go(viz.FULLSCREEN)
#BL:end
viz.clip(0.1)
vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
if(len(collisionLimbBoxes) > 0):
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes);
else:
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None);
else:
pptSimulation.setup(avatar);
viz.clip(0.1)
viz.go(viz.FULLSCREEN);
vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
示例12: vhilGo
def vhilGo(rift=False, ppt1=False, OH=False, otherTrackerVirtualIDs=[], debug=False, homePos=[0,1.82,0], homeOri=[0,0,0]): #, **kwargs
global RIFT
global PPT1
global DEBUG
global HOME_POS
global HOME_ORI
# Run-context constants #
RIFT = rift # Indicates whether we are going to run the simulation on an Oculus Rift.
PPT1 = ppt1 # Indicates whether we are going to run the simulation in PPT1.
DEBUG = debug # Indicates whether we are going to run the simulation in debug mode, enabling extra controls and features
# HOME_POS, HOME_ORI: Starting position and orientation of viz.MainView.
# reset() resets to the home position and home orientation by default.
HOME_POS = homePos
HOME_ORI = homeOri
viz.go()
reset()
return setupHardware(OH, otherTrackerVirtualIDs)
示例13: InitHMD
def InitHMD():
# BL:start
global collisionLimbBoxes, isLeftHanded
if USE_HMD:
viz.go(viz.HMD | viz.TRACKER)
viz.window.setSize(1260, 950)
pptExtension.setup(isLeftHanded)
# viz.go(viz.FULLSCREEN)
# BL:end
viz.clip(0.1)
vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes)
if len(collisionLimbBoxes) > 0:
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes)
else:
vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None)
else:
pptSimulation.setup(avatar)
viz.clip(0.1)
viz.go(viz.FULLSCREEN)
vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes)
示例14: setUp
def setUp():
global currentCondition
viz.setMultiSample(8)
initGlobals()
currentCondition = viz.choose('Select condition:', CONDITION_CHOICES)
print "CurCondition:", currentCondition
setFlags()
# setUpRecording()
#
# if YOKE_F:
# setUpYoke()
#
# if not FLYING_F:
# setUpHelicopter()
#
# if(not confirmStates(currentCondition)):
# viz.quit()
# finish() #TODO make it so that on failure no files are created.
# return
#
# #configData()
if USE_HMD_F:
setUpHMD()
if not FLYING_F:
setHeliInitPos()
else:
viz.go()
viz.MainView.setPosition(START_POSITION_HELI)
setUpWorld()
setUpChild()
setUpSound()
示例15: __init__
def __init__(self, filename=''):
'''Opens and interprets configuration files for running experiments.
This constructor opens both the system config (as defined by the
<platform>.cfg file) and the experiment config (as defined by the given
filename).
Both configurations must conform the specs given in SYSTEM.ini and
experiment.ini respectively. It also initializes the system as specified
in the system config.
'''
self.exp = self.create_exp_config(filename)
self.sys = self.create_sys_config()
for path in self.sys['set_path']:
viz.res.addPath(path)
viz.window.setFullscreenMonitor(self.sys['displays'])
viz.setMultiSample(self.sys['antiAliasPasses'])
viz.MainWindow.clip(0.01, 200)
self.writables = []
self.writer = None
self.mocap = None
self.body_camera = None
self._setup_hmd()
self._setup_recorder()
self._setup_eyetracking()
self._setup_phasespace()
self._setup_hiball()
self.writables.append(self.mocap)
self.writables.append(self.body_camera)
if self.sys['use_fullscreen']:
viz.go(viz.FULLSCREEN)
else:
viz.go()